From 83961398011dbfa2246beedb12d821b232823788 Mon Sep 17 00:00:00 2001 From: Luis Helder Date: Wed, 15 Jun 2022 16:43:43 -0300 Subject: [PATCH 1/8] fix: try to use specific rust version --- .github/workflows/docker.yml | 3 ++- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 943b276..63237cf 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,6 +5,7 @@ on: - v* branches: - master + - fix/rust-build jobs: # Builds and pushes the Docker image to Docker Hub and ECR @@ -56,7 +57,7 @@ jobs: - name: Build and push uses: docker/build-push-action@a66e35b9cbcf4ad0ea91ffcaf7bbad63ad9e0229 with: - push: true + push: false tags: ${{ steps.tags.outputs.tags }} platforms: linux/amd64,linux/arm64 cache-from: type=gha diff --git a/Dockerfile b/Dockerfile index f457a6e..6d1dcf8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM python:3.9-alpine as build WORKDIR /code # Why we need rust: https://github.com/pyca/cryptography/issues/5771 -RUN apk add --no-cache gcc musl-dev libffi-dev openssl-dev rust cargo +RUN apk add --no-cache gcc musl-dev libffi-dev openssl-dev rust=1.56.0-r0 cargo=1.56.0-r0 RUN pip --no-input --no-cache-dir install --upgrade pip wheel RUN pip --no-input --no-cache-dir install 'poetry==1.1.6' From ccdf3a7418eee52ac975725a322a27f6bd23875b Mon Sep 17 00:00:00 2001 From: Luis Helder Date: Wed, 15 Jun 2022 16:47:24 -0300 Subject: [PATCH 2/8] fix: use previous Alpine version --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6d1dcf8..66b9026 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM python:3.9-alpine as build +FROM python:3.9-alpine3.15 as build WORKDIR /code # Why we need rust: https://github.com/pyca/cryptography/issues/5771 -RUN apk add --no-cache gcc musl-dev libffi-dev openssl-dev rust=1.56.0-r0 cargo=1.56.0-r0 +RUN apk add --no-cache gcc musl-dev libffi-dev openssl-dev rust cargo RUN pip --no-input --no-cache-dir install --upgrade pip wheel RUN pip --no-input --no-cache-dir install 'poetry==1.1.6' From 9a2961ab09bdcd2e70ec08478cae6e30b41efaf1 Mon Sep 17 00:00:00 2001 From: Luis Helder Date: Wed, 15 Jun 2022 17:10:37 -0300 Subject: [PATCH 3/8] fix: disable arm build --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 63237cf..a474144 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -59,6 +59,6 @@ jobs: with: push: false tags: ${{ steps.tags.outputs.tags }} - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 cache-from: type=gha cache-to: type=gha,mode=max From 2454f676773b77ed32d9a706d53b22a64db1d6a2 Mon Sep 17 00:00:00 2001 From: Luis Helder Date: Tue, 21 Jun 2022 18:27:50 -0300 Subject: [PATCH 4/8] fix: test newer version of Poetry --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 66b9026..f646920 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,12 @@ FROM python:3.9-alpine3.15 as build WORKDIR /code +RUN pip --no-input --no-cache-dir install --upgrade pip wheel +RUN pip --no-input --no-cache-dir install 'poetry==1.2.0b2' + # Why we need rust: https://github.com/pyca/cryptography/issues/5771 RUN apk add --no-cache gcc musl-dev libffi-dev openssl-dev rust cargo -RUN pip --no-input --no-cache-dir install --upgrade pip wheel -RUN pip --no-input --no-cache-dir install 'poetry==1.1.6' - COPY poetry.lock pyproject.toml /code/ RUN poetry config virtualenvs.create false \ From bbb8f4e4ce3d2d840ccbb5e90634b28f84da16f5 Mon Sep 17 00:00:00 2001 From: Luis Helder Date: Tue, 21 Jun 2022 18:29:47 -0300 Subject: [PATCH 5/8] fix: test newer version of Poetry --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f646920..2f94e6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,12 @@ FROM python:3.9-alpine3.15 as build WORKDIR /code -RUN pip --no-input --no-cache-dir install --upgrade pip wheel -RUN pip --no-input --no-cache-dir install 'poetry==1.2.0b2' - # Why we need rust: https://github.com/pyca/cryptography/issues/5771 RUN apk add --no-cache gcc musl-dev libffi-dev openssl-dev rust cargo +RUN pip --no-input --no-cache-dir install --upgrade pip wheel +RUN pip --no-input --no-cache-dir install 'poetry==1.2.0b2' + COPY poetry.lock pyproject.toml /code/ RUN poetry config virtualenvs.create false \ From 9b3de2a0fa28b41e7bc29f0a4f37801a12a04d55 Mon Sep 17 00:00:00 2001 From: Luis Helder Date: Tue, 21 Jun 2022 18:32:40 -0300 Subject: [PATCH 6/8] chore: readd arm64 --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index a474144..63237cf 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -59,6 +59,6 @@ jobs: with: push: false tags: ${{ steps.tags.outputs.tags }} - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 cache-from: type=gha cache-to: type=gha,mode=max From 6bbcb6bb7bbb048baf771b53e44cc69a6aa59b1c Mon Sep 17 00:00:00 2001 From: Luis Helder Date: Tue, 21 Jun 2022 18:46:04 -0300 Subject: [PATCH 7/8] chore: undo downgrade of Alpine --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2f94e6b..019bb6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.9-alpine3.15 as build +FROM python:3.9-alpine as build WORKDIR /code @@ -11,7 +11,7 @@ RUN pip --no-input --no-cache-dir install 'poetry==1.2.0b2' COPY poetry.lock pyproject.toml /code/ RUN poetry config virtualenvs.create false \ - && poetry install --no-dev --no-interaction --no-ansi + && poetry install --only main --no-interaction --no-ansi FROM python:3.9-alpine From e796eaf4f05578fbf8001c4dfb9058ee6a67fac9 Mon Sep 17 00:00:00 2001 From: Luis Helder Date: Wed, 22 Jun 2022 14:13:53 -0300 Subject: [PATCH 8/8] fix: undo debug changes --- .github/workflows/docker.yml | 3 +-- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 63237cf..943b276 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -5,7 +5,6 @@ on: - v* branches: - master - - fix/rust-build jobs: # Builds and pushes the Docker image to Docker Hub and ECR @@ -57,7 +56,7 @@ jobs: - name: Build and push uses: docker/build-push-action@a66e35b9cbcf4ad0ea91ffcaf7bbad63ad9e0229 with: - push: false + push: true tags: ${{ steps.tags.outputs.tags }} platforms: linux/amd64,linux/arm64 cache-from: type=gha diff --git a/Dockerfile b/Dockerfile index 019bb6e..2c6cefc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /code RUN apk add --no-cache gcc musl-dev libffi-dev openssl-dev rust cargo RUN pip --no-input --no-cache-dir install --upgrade pip wheel -RUN pip --no-input --no-cache-dir install 'poetry==1.2.0b2' +RUN pip --no-input --no-cache-dir install 'poetry>=1.2.0b2' COPY poetry.lock pyproject.toml /code/