Skip to content

Commit 1df1971

Browse files
authored
Merge pull request #379 from dvdksn/example-voting-app-fixups
2 parents 8cd0cad + a4901e4 commit 1df1971

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

result/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN npm ci && \
1818

1919
COPY . .
2020

21-
ENV PORT 80
21+
ENV PORT=80
2222
EXPOSE 80
2323

2424
ENTRYPOINT ["/usr/bin/tini", "--"]

seed-data/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ COPY . .
1313
# create POST data files with ab friendly formats
1414
RUN python make-data.py
1515

16-
CMD /seed/generate-votes.sh
16+
CMD ["/seed/generate-votes.sh"]

vote/Dockerfile

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Define a base stage that uses the official python runtime base image
1+
# base defines a base stage that uses the official python runtime base image
22
FROM python:3.11-slim AS base
33

44
# Add curl for healthcheck
@@ -13,14 +13,13 @@ WORKDIR /usr/local/app
1313
COPY requirements.txt ./requirements.txt
1414
RUN pip install --no-cache-dir -r requirements.txt
1515

16-
# Define a stage specifically for development, where it'll watch for
17-
# filesystem changes
16+
# dev defines a stage for development, where it'll watch for filesystem changes
1817
FROM base AS dev
1918
RUN pip install watchdog
2019
ENV FLASK_ENV=development
2120
CMD ["python", "app.py"]
2221

23-
# Define the final stage that will bundle the application for production
22+
# final defines the stage that will bundle the application for production
2423
FROM base AS final
2524

2625
# Copy our code from the current folder to the working directory inside the container

worker/Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
# to build for a different platform than your host, use --platform=<platform>
77
# for example, if you were on Intel (amd64) and wanted to build for ARM, you would use:
88
# docker buildx build --platform "linux/arm64/v8" .
9-
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/dotnet/sdk:7.0 as build
9+
10+
# build compiles the program for the builder's local platform
11+
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/dotnet/sdk:7.0 AS build
1012
ARG TARGETPLATFORM
1113
ARG TARGETARCH
1214
ARG BUILDPLATFORM
@@ -23,4 +25,4 @@ RUN dotnet publish -c release -o /app -a $TARGETARCH --self-contained false --no
2325
FROM mcr.microsoft.com/dotnet/runtime:7.0
2426
WORKDIR /app
2527
COPY --from=build /app .
26-
ENTRYPOINT ["dotnet", "Worker.dll"]
28+
ENTRYPOINT ["dotnet", "Worker.dll"]

0 commit comments

Comments
 (0)