forked from Kudaraidee/miningcore-xiaolin1579
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (23 loc) · 817 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
27
28
29
30
FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy as BUILDER
WORKDIR /app
RUN apt-get update && \
apt-get -y install \
cmake build-essential libssl-dev \
pkg-config libboost-all-dev \
libsodium-dev libzmq5 libzmq3-dev 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" ]