Skip to content

[CONFIG] Docker cosmetic comments added. #63

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

Merged
merged 1 commit into from
Jun 6, 2024
Merged
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
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
###############################################################################
FROM mcr.microsoft.com/dotnet/sdk:8.0.301-alpine3.19-amd64 AS base

ENV WORKDIR=/app
WORKDIR ${WORKDIR}

###############################################################################
FROM node:22.2.0-alpine3.19 AS lint

ENV WORKDIR=/app
Expand All @@ -19,17 +21,20 @@ COPY ./docs ${WORKDIR}/docs
RUN apk add --update --no-cache make
RUN npm install -g --ignore-scripts markdownlint-cli

###############################################################################
FROM base AS development

RUN apk add --update --no-cache make

###############################################################################
FROM development AS builder

COPY ./algorithm-exercises-csharp ${WORKDIR}/algorithm-exercises-csharp
COPY ./algorithm-exercises-csharp.sln ${WORKDIR}/algorithm-exercises-csharp.sln
COPY ./Makefile ${WORKDIR}/
RUN ls -alh

###############################################################################
### In testing stage, can't use USER, due permissions issue
## in github actions environment:
##
Expand All @@ -47,6 +52,7 @@ RUN ls -alh

CMD ["dotnet", "test"]

###############################################################################
### In production stage
## in the production phase, "good practices" such as
## WORKSPACE and USER are maintained
Expand Down