forked from NethermindEth/nethermind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
46 lines (37 loc) · 1.95 KB
/
Dockerfile.dev
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
41
42
43
44
45
46
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:6.0 AS build
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
ARG BUILDPLATFORM
COPY . .
RUN if [ "$TARGETARCH" = "amd64" ] ; \
then git submodule update --init src/Dirichlet src/int256 src/rocksdb-sharp src/Math.Gmp.Native && \
dotnet tool install JetBrains.dotTrace.GlobalTools --version 2021.3.2 --tool-path /tmp/ && \
dotnet add src/Nethermind/Nethermind.Runner package JetBrains.dotMemory.Console.$TARGETOS-x64 --version 2021.3.2 --package-directory /tmp/ && \
dotnet publish src/Nethermind/Nethermind.Runner -r $TARGETOS-x64 -c release -o out ; \
else git submodule update --init src/Dirichlet src/int256 src/rocksdb-sharp src/Math.Gmp.Native && \
dotnet tool install JetBrains.dotTrace.GlobalTools --version 2021.3.2 --tool-path /tmp/ && \
dotnet add src/Nethermind/Nethermind.Runner package JetBrains.dotMemory.Console.$TARGETOS-$TARGETARCH --version 2021.3.2 --package-directory /tmp/ && \
dotnet publish src/Nethermind/Nethermind.Runner -r $TARGETOS-$TARGETARCH -c release -o out ; \
fi
RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-trace && \
dotnet tool install --tool-path /dotnetcore-tools dotnet-dump && \
dotnet tool install --tool-path /dotnetcore-tools dotnet-gcdump
FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:6.0
RUN apt-get update && apt-get -y install libsnappy-dev libc6-dev libc6 procps && \
rm -rf /var/lib/apt/lists/*
WORKDIR /nethermind
COPY --from=build /out .
COPY --from=build /dotnetcore-tools /opt/dotnetcore-tools
COPY --from=build /tmp/jetbrains.dotmemory.console.* /opt/tools
COPY --from=build /tmp/dottrace /opt/tools
COPY --from=build /tmp/.store /opt/tools/.store
ENV PATH="/opt/dotnetcore-tools:${PATH}"
ARG GIT_COMMIT=unspecified
LABEL git_commit=$GIT_COMMIT
EXPOSE 8545
EXPOSE 30303
VOLUME /nethermind/nethermind_db
VOLUME /nethermind/logs
VOLUME /nethermind/keystore
ENTRYPOINT ["./Nethermind.Runner"]