-
Notifications
You must be signed in to change notification settings - Fork 458
/
Dockerfile.chiseled
38 lines (26 loc) · 979 Bytes
/
Dockerfile.chiseled
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
# SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
# SPDX-License-Identifier: LGPL-3.0-only
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0-noble AS build
ARG BUILD_CONFIG=release
ARG BUILD_TIMESTAMP
ARG CI
ARG COMMIT_HASH
ARG TARGETARCH
COPY src/Nethermind src/Nethermind
RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \
dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false \
-p:BuildTimestamp=$BUILD_TIMESTAMP -p:Commit=$COMMIT_HASH
# Creating these directories here is needed to ensure the correct permissions
RUN cd /publish && \
mkdir keystore && \
mkdir logs && \
mkdir nethermind_db
FROM mcr.microsoft.com/dotnet/aspnet:9.0-noble-chiseled
WORKDIR /nethermind
VOLUME /nethermind/keystore
VOLUME /nethermind/logs
VOLUME /nethermind/nethermind_db
EXPOSE 8545 8551 30303
COPY --from=build --chown=app /publish .
USER app
ENTRYPOINT ["./nethermind"]