diff --git a/.github/workflows/python_ci.yaml b/.github/workflows/python_ci.yaml index 7ff906c..2c1bec5 100644 --- a/.github/workflows/python_ci.yaml +++ b/.github/workflows/python_ci.yaml @@ -69,3 +69,13 @@ jobs: run: | poetry run isort --profile black . git diff --exit-code --quiet || exit 1 + + build-image-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + # This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. + - name: Build and push Docker image + uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 + with: + push: false diff --git a/Dockerfile b/Dockerfile index 5b8f117..d94048a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Install Poetry and create venv in the builder step, # then copy the venv to the runtime image, so that the runtime image is as small as possible. -FROM --platform=linux/amd64 python:3.10.14-slim-bookworm AS builder +FROM --platform=linux/amd64 python:3.10.14-bookworm AS builder RUN pip install poetry==1.8.2 @@ -15,7 +15,7 @@ COPY pyproject.toml poetry.lock ./ RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install --no-root --only main -FROM --platform=linux/amd64 python:3.10.14-slim-bookworm AS runtime +FROM --platform=linux/amd64 python:3.10.14-bookworm AS runtime ENV VIRTUAL_ENV=/app/.venv \ PATH="/app/.venv/bin:$PATH"