forked from NethermindEth/nethermind
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (28 loc) · 1.16 KB
/
Dockerfile
File metadata and controls
40 lines (28 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
# SPDX-License-Identifier: LGPL-3.0-only
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.102-noble@sha256:6ba533cc61a5d8c5e7d4b3a3e33e2ddc2efef200b112e4d658303516bfd24255 AS build
ARG BUILD_CONFIG=release
ARG CI=true
ARG COMMIT_HASH
ARG SOURCE_DATE_EPOCH
ARG TARGETARCH
WORKDIR /nethermind
COPY src/Nethermind src/Nethermind
COPY Directory.*.props .
COPY global.json .
COPY nuget.config .
RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \
cd src/Nethermind/Nethermind.Runner && \
dotnet restore --locked-mode && \
dotnet publish -c $BUILD_CONFIG -a $arch -o /publish --no-restore --no-self-contained \
-p:SourceRevisionId=$COMMIT_HASH
# A temporary symlink to support the old executable name
RUN ln -sr /publish/nethermind /publish/Nethermind.Runner
FROM mcr.microsoft.com/dotnet/aspnet:10.0.2-noble@sha256:7feda9a96737a8c268cc7636c92d0efda3512ef019e3c409dd97c7c9ae9e2bdb
WORKDIR /nethermind
VOLUME /nethermind/keystore
VOLUME /nethermind/logs
VOLUME /nethermind/nethermind_db
EXPOSE 8545 8551 30303
COPY --from=build /publish .
ENTRYPOINT ["./nethermind"]