Skip to content

Commit ece568e

Browse files
committed
fix: fix cross-platform issues with docker files
1 parent 4ff2b78 commit ece568e

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

src/AWS.Deploy.Orchestration/Docker/Templates/Dockerfile.Net6.template

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ WORKDIR "/src/{project-folder}"
1111
RUN dotnet build "{project-name}" -c Release -o /app/build
1212

1313
FROM build AS publish
14-
RUN apt-get update -yq \
15-
&& apt-get install -yq ca-certificates curl gnupg \
16-
&& mkdir -p /etc/apt/keyrings \
17-
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
18-
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
19-
&& apt-get update -yq \
20-
&& apt-get install nodejs -yq
2114
RUN dotnet publish "{project-name}" -c Release -o /app/publish
2215

2316
FROM base AS final{http-port-env-variable}

src/AWS.Deploy.Orchestration/Docker/Templates/Dockerfile.template

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM {docker-base-image} AS base{non-root-user}
1+
FROM {docker-base-image} AS base{non-root-user}
22
WORKDIR /app
33
{exposed-ports}
44

@@ -13,13 +13,6 @@ RUN dotnet build "{project-name}" -c Release -o /app/build -a $TARGETARCH
1313

1414
FROM build AS publish
1515
ARG TARGETARCH
16-
RUN apt-get update -yq \
17-
&& apt-get install -yq ca-certificates curl gnupg \
18-
&& mkdir -p /etc/apt/keyrings \
19-
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
20-
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
21-
&& apt-get update -yq \
22-
&& apt-get install nodejs -yq
2316
RUN dotnet publish "{project-name}" -c Release -o /app/publish -a $TARGETARCH
2417

2518
FROM base AS final{http-port-env-variable}

0 commit comments

Comments
 (0)