forked from oliverw/miningcore
-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathDockerfile
26 lines (20 loc) · 821 Bytes
/
Dockerfile
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
FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy as BUILDER
WORKDIR /app
RUN apt-get update && \
apt-get -y install cmake ninja-build build-essential libssl-dev pkg-config libboost-all-dev libsodium-dev libzmq5n libzmq3-dev golang-go libgmp-dev
COPY . .
WORKDIR /app/src/Miningcore
RUN dotnet publish -c Release --framework net6.0 -o ../../build
# Runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0-jammy
WORKDIR /app
RUN apt-get update && \
apt-get install -y libzmq5 libzmq3-dev libsodium-dev libgmp-dev libboost-all-dev curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN groupadd -g 10001 miningcore
RUN useradd -u 10001 -g miningcore -d /app miningcore
RUN chown -R miningcore:miningcore /app
USER miningcore
COPY --from=BUILDER /app/build ./
CMD ["./Miningcore", "-c", "config.json" ]