From bb263f9bb0c37277bef735aac936d07cf5def290 Mon Sep 17 00:00:00 2001 From: brassy endomorph Date: Fri, 20 Sep 2024 18:03:09 +0000 Subject: [PATCH 1/2] fix docker builds --- .github/workflows/build-and-deploy-release.yml | 2 +- .github/workflows/build-latest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-deploy-release.yml b/.github/workflows/build-and-deploy-release.yml index d6182726..5383277c 100644 --- a/.github/workflows/build-and-deploy-release.yml +++ b/.github/workflows/build-and-deploy-release.yml @@ -32,7 +32,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . - file: ./Dockerfile + file: ./Dockerfile.prod push: true tags: | ghcr.io/${{ github.repository }}/hushline:${{ github.ref_name }} diff --git a/.github/workflows/build-latest.yml b/.github/workflows/build-latest.yml index 08c485aa..75dca029 100644 --- a/.github/workflows/build-latest.yml +++ b/.github/workflows/build-latest.yml @@ -23,7 +23,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . - file: ./Dockerfile + file: ./Dockerfile.prod push: true tags: ghcr.io/${{ github.repository }}/hushline:latest platforms: linux/amd64,linux/arm64 From 26c8f482ac95a632224bd44a1d29b8ee8698c689 Mon Sep 17 00:00:00 2001 From: brassy endomorph Date: Fri, 20 Sep 2024 18:14:50 +0000 Subject: [PATCH 2/2] fix dockerfiles --- Dockerfile.dev | 5 +++-- Dockerfile.prod | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile.dev b/Dockerfile.dev index b4c13858..a5f21165 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -2,7 +2,8 @@ FROM python:3.12.6-slim-bookworm RUN apt-get update && \ - apt-get install -y \ + apt-get upgrade -y && \ + apt-get install -y --no-install-recommends \ build-essential \ libffi-dev \ libpq-dev @@ -10,7 +11,7 @@ RUN apt-get update && \ RUN pip install poetry WORKDIR /app -ENV PYTHONPATH /app +ENV PYTHONPATH=/app COPY pyproject.toml poetry.lock . diff --git a/Dockerfile.prod b/Dockerfile.prod index f129a2cc..d5a0ea5b 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -1,5 +1,5 @@ # vim: set syntax=dockerfile : -FROM python:3.12.6-bookworm-slim +FROM python:3.12.6-slim-bookworm WORKDIR /app