@@ -13,8 +13,8 @@ ENV WORKDIR=/app
1313WORKDIR ${WORKDIR}
1414
1515COPY ./Makefile ${WORKDIR}/
16- COPY ./algorithm-exercises-csharp .sln ${WORKDIR}/algorithm-exercises-csharp .sln
17- COPY ./algorithm-exercises-csharp/algorithm-exercises-csharp .csproj ${WORKDIR}/algorithm-exercises-csharp/algorithm-exercises-csharp .csproj
16+ COPY ./algorithm_exercises_csharp .sln ${WORKDIR}/algorithm_exercises_csharp .sln
17+ COPY ./algorithm_exercises_csharp/algorithm_exercises_csharp .csproj ${WORKDIR}/algorithm_exercises_csharp/algorithm_exercises_csharp .csproj
1818COPY ./algorithm-exercises-csharp-base/algorithm-exercises-csharp-base.csproj ${WORKDIR}/algorithm-exercises-csharp-base/algorithm-exercises-csharp-base.csproj
1919COPY ./algorithm-exercises-csharp-test/algorithm-exercises-csharp-test.csproj ${WORKDIR}/algorithm-exercises-csharp-test/algorithm-exercises-csharp-test.csproj
2020
@@ -26,10 +26,9 @@ FROM base AS lint
2626ENV WORKDIR=/app
2727WORKDIR ${WORKDIR}
2828
29- RUN apk add --update --no-cache make nodejs npm
30- RUN apk add --update --no-cache yamllint
31- 32- RUN npm install -g --ignore-scripts markdownlint-cli
29+ RUN apk add --update --no-cache make nodejs npm \
30+ && apk add --update --no-cache yamllint \
31+ && npm install -g --ignore-scripts markdownlint-cli
3332
3433# [!TIP] Use a bind-mount to "/app" to override following "copys"
3534# for lint and test against "current" sources in this stage
@@ -45,10 +44,10 @@ COPY ./LICENSE.md ${WORKDIR}/
4544COPY ./CODE_OF_CONDUCT.md ${WORKDIR}/
4645
4746# Code source
48- COPY ./algorithm-exercises-csharp ${WORKDIR}/algorithm-exercises-csharp
47+ COPY ./algorithm_exercises_csharp.sln ${WORKDIR}/algorithm_exercises_csharp.sln
48+ COPY ./algorithm_exercises_csharp ${WORKDIR}/algorithm_exercises_csharp
4949COPY ./algorithm-exercises-csharp-base ${WORKDIR}/algorithm-exercises-csharp-base
5050COPY ./algorithm-exercises-csharp-test ${WORKDIR}/algorithm-exercises-csharp-test
51- COPY ./algorithm-exercises-csharp.sln ${WORKDIR}/algorithm-exercises-csharp.sln
5251
5352# code linting conf
5453COPY ./.editorconfig ${WORKDIR}/
@@ -65,20 +64,20 @@ CMD ["make", "lint"]
6564# ##############################################################################
6665FROM base AS development
6766
68- COPY ./algorithm-exercises-csharp ${WORKDIR}/algorithm-exercises-csharp
67+ COPY ./algorithm_exercises_csharp.sln ${WORKDIR}/algorithm_exercises_csharp.sln
68+ COPY ./algorithm_exercises_csharp ${WORKDIR}/algorithm_exercises_csharp
6969COPY ./algorithm-exercises-csharp-base ${WORKDIR}/algorithm-exercises-csharp-base
7070COPY ./algorithm-exercises-csharp-test ${WORKDIR}/algorithm-exercises-csharp-test
71- COPY ./algorithm-exercises-csharp.sln ${WORKDIR}/algorithm-exercises-csharp.sln
7271
73- RUN make build
74- RUN ls -alh
72+ RUN make build \
73+ && ls -alh
7574
7675# CMD []
7776# ##############################################################################
7877FROM development AS builder
7978
80- RUN dotnet publish --self-contained --runtime linux-musl-x64
81- RUN ls -alh
79+ RUN dotnet publish --self-contained --runtime linux-musl-x64 \
80+ && ls -alh
8281
8382CMD ["ls" , "-alh" ]
8483
@@ -106,19 +105,20 @@ CMD ["make", "test"]
106105# #
107106FROM mcr.microsoft.com/dotnet/runtime:8.0.8-alpine3.19-amd64 AS production
108107
108+ RUN apk add --update --no-cache make
109+ 109110ENV LOG_LEVEL=info
110111ENV BRUTEFORCE=false
111112ENV WORKDIR=/app
112113WORKDIR ${WORKDIR}
113114
114- RUN adduser -D worker
115- RUN mkdir -p /app
116- RUN chown worker:worker /app
115+ RUN adduser -D worker \
116+ && mkdir -p /app \
117+ && chown worker:worker /app
117118
118- RUN apk add --update --no-cache make
119119COPY ./Makefile ${WORKDIR}/
120- COPY --from=builder /app/algorithm-exercises-csharp /bin/Release/net8.0/algorithm-exercises-csharp .dll ${WORKDIR}/
121- COPY --from=builder /app/algorithm-exercises-csharp /bin/Release/net8.0/algorithm-exercises-csharp .runtimeconfig.json ${WORKDIR}/
120+ COPY --from=builder /app/algorithm_exercises_csharp /bin/Release/net8.0/algorithm_exercises_csharp .dll ${WORKDIR}/
121+ COPY --from=builder /app/algorithm_exercises_csharp /bin/Release/net8.0/algorithm_exercises_csharp .runtimeconfig.json ${WORKDIR}/
122122
123123RUN ls -alh
124124
0 commit comments