From 2932a6f3d42986e6e691ad226bfc46624efdcccd Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:37:08 +0200 Subject: [PATCH 1/4] lint: fix LegacyKeyValueFormat Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- result/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/result/Dockerfile b/result/Dockerfile index 4fb74e8ca7..33f0ba86fb 100644 --- a/result/Dockerfile +++ b/result/Dockerfile @@ -18,7 +18,7 @@ RUN npm ci && \ COPY . . -ENV PORT 80 +ENV PORT=80 EXPOSE 80 ENTRYPOINT ["/usr/bin/tini", "--"] From 0d759017a4b76a312360dabde2d4ca39e76d2520 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:38:04 +0200 Subject: [PATCH 2/4] lint: fix FromAsCasing Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- worker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worker/Dockerfile b/worker/Dockerfile index cdd31baecb..2435a8ad7a 100644 --- a/worker/Dockerfile +++ b/worker/Dockerfile @@ -6,7 +6,7 @@ # to build for a different platform than your host, use --platform= # for example, if you were on Intel (amd64) and wanted to build for ARM, you would use: # docker buildx build --platform "linux/arm64/v8" . -FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/dotnet/sdk:7.0 as build +FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/dotnet/sdk:7.0 AS build ARG TARGETPLATFORM ARG TARGETARCH ARG BUILDPLATFORM @@ -23,4 +23,4 @@ RUN dotnet publish -c release -o /app -a $TARGETARCH --self-contained false --no FROM mcr.microsoft.com/dotnet/runtime:7.0 WORKDIR /app COPY --from=build /app . -ENTRYPOINT ["dotnet", "Worker.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "Worker.dll"] From 19409732f8d533a8103c9a81917f1559e5c5e711 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:41:22 +0200 Subject: [PATCH 3/4] lint: fix JSONArgsRecommended Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- seed-data/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed-data/Dockerfile b/seed-data/Dockerfile index 18e55e8429..f970e42ad4 100644 --- a/seed-data/Dockerfile +++ b/seed-data/Dockerfile @@ -13,4 +13,4 @@ COPY . . # create POST data files with ab friendly formats RUN python make-data.py -CMD /seed/generate-votes.sh \ No newline at end of file +CMD ["/seed/generate-votes.sh"] From a4901e48f1f0ba38da121b5817cbb050483f0b58 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:47:49 +0200 Subject: [PATCH 4/4] lint: fix InvalidDefinitionDescription Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- vote/Dockerfile | 7 +++---- worker/Dockerfile | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/vote/Dockerfile b/vote/Dockerfile index 9e812ca958..2681083600 100644 --- a/vote/Dockerfile +++ b/vote/Dockerfile @@ -1,4 +1,4 @@ -# Define a base stage that uses the official python runtime base image +# base defines a base stage that uses the official python runtime base image FROM python:3.11-slim AS base # Add curl for healthcheck @@ -13,14 +13,13 @@ WORKDIR /usr/local/app COPY requirements.txt ./requirements.txt RUN pip install --no-cache-dir -r requirements.txt -# Define a stage specifically for development, where it'll watch for -# filesystem changes +# dev defines a stage for development, where it'll watch for filesystem changes FROM base AS dev RUN pip install watchdog ENV FLASK_ENV=development CMD ["python", "app.py"] -# Define the final stage that will bundle the application for production +# final defines the stage that will bundle the application for production FROM base AS final # Copy our code from the current folder to the working directory inside the container diff --git a/worker/Dockerfile b/worker/Dockerfile index 2435a8ad7a..a3f92d7e94 100644 --- a/worker/Dockerfile +++ b/worker/Dockerfile @@ -6,6 +6,8 @@ # to build for a different platform than your host, use --platform= # for example, if you were on Intel (amd64) and wanted to build for ARM, you would use: # docker buildx build --platform "linux/arm64/v8" . + +# build compiles the program for the builder's local platform FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/dotnet/sdk:7.0 AS build ARG TARGETPLATFORM ARG TARGETARCH