Skip to content

Commit 4d3d8c8

Browse files
committed
fix: update dockerfile
1 parent 531d0e0 commit 4d3d8c8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

nethermind/Dockerfile

+6-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \
1212
RUN cd op-node && \
1313
make VERSION=$VERSION op-node
1414

15-
FROM mcr.microsoft.com/dotnet/sdk:8.0-noble AS build
15+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-noble AS build
1616

1717
ARG BUILD_CONFIG=release
1818
ARG TARGETARCH
@@ -25,12 +25,13 @@ ENV COMMIT=7320938e5fe74ad6ac1782ce723ddb7bb7d3d78a
2525
RUN git clone $REPO --branch release/$VERSION --single-branch . && \
2626
git switch -c branch-$VERSION
2727
RUN bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'
28+
RUN TARGETARCH=${TARGETARCH#linux/} && \
29+
arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \
30+
echo "Using architecture: $arch" && \
31+
dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false
2832

29-
RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \
30-
dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false
3133

32-
33-
FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble
34+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0-noble
3435

3536
RUN apt-get update && \
3637
apt-get install -y jq curl supervisor && \

0 commit comments

Comments
 (0)