Skip to content

Commit f2bfd80

Browse files
author
Gonzalo Diaz
committed
[BREAKING] ⚠️ [REFACTOR] [CONFIG] project (main) rename due namespaces issues: https://stackoverflow.com/a/31741692/6366150
1 parent 4146ed7 commit f2bfd80

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

Dockerfile

+19-19
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV WORKDIR=/app
1313
WORKDIR ${WORKDIR}
1414

1515
COPY ./Makefile ${WORKDIR}/
16-
COPY ./algorithm-exercises-csharp.sln ${WORKDIR}/algorithm-exercises-csharp.sln
16+
COPY ./algorithm_exercises_csharp.sln ${WORKDIR}/algorithm_exercises_csharp.sln
1717
COPY ./algorithm-exercises-csharp/algorithm-exercises-csharp.csproj ${WORKDIR}/algorithm-exercises-csharp/algorithm-exercises-csharp.csproj
1818
COPY ./algorithm-exercises-csharp-base/algorithm-exercises-csharp-base.csproj ${WORKDIR}/algorithm-exercises-csharp-base/algorithm-exercises-csharp-base.csproj
1919
COPY ./algorithm-exercises-csharp-test/algorithm-exercises-csharp-test.csproj ${WORKDIR}/algorithm-exercises-csharp-test/algorithm-exercises-csharp-test.csproj
@@ -26,10 +26,9 @@ FROM base AS lint
2626
ENV WORKDIR=/app
2727
WORKDIR ${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}/
4544
COPY ./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
4949
COPY ./algorithm-exercises-csharp-base ${WORKDIR}/algorithm-exercises-csharp-base
5050
COPY ./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
5453
COPY ./.editorconfig ${WORKDIR}/
@@ -65,20 +64,20 @@ CMD ["make", "lint"]
6564
###############################################################################
6665
FROM base AS development
6766

68-
COPY ./algorithm-exercises-csharp ${WORKDIR}/algorithm-exercises-csharp
67+
COPY ./algorithm_exercises_csharp ${WORKDIR}/algorithm_exercises_csharp
6968
COPY ./algorithm-exercises-csharp-base ${WORKDIR}/algorithm-exercises-csharp-base
7069
COPY ./algorithm-exercises-csharp-test ${WORKDIR}/algorithm-exercises-csharp-test
71-
COPY ./algorithm-exercises-csharp.sln ${WORKDIR}/algorithm-exercises-csharp.sln
70+
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
###############################################################################
7877
FROM 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

8382
CMD ["ls", "-alh"]
8483

@@ -106,19 +105,20 @@ CMD ["make", "test"]
106105
##
107106
FROM mcr.microsoft.com/dotnet/runtime:8.0.8-alpine3.19-amd64 AS production
108107

108+
RUN apk add --update --no-cache make
109+
109110
ENV LOG_LEVEL=info
110111
ENV BRUTEFORCE=false
111112
ENV WORKDIR=/app
112113
WORKDIR ${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
119119
COPY ./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

123123
RUN ls -alh
124124

0 commit comments

Comments
 (0)