Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint: fix Dockerfile build check warnings #379

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion result/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN npm ci && \

COPY . .

ENV PORT 80
ENV PORT=80
EXPOSE 80

ENTRYPOINT ["/usr/bin/tini", "--"]
Expand Down
2 changes: 1 addition & 1 deletion seed-data/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ COPY . .
# create POST data files with ab friendly formats
RUN python make-data.py

CMD /seed/generate-votes.sh
CMD ["/seed/generate-votes.sh"]
7 changes: 3 additions & 4 deletions vote/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
# to build for a different platform than your host, use --platform=<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

# 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
ARG BUILDPLATFORM
Expand All @@ -23,4 +25,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"]
ENTRYPOINT ["dotnet", "Worker.dll"]
Loading