forked from NethermindEth/nethermind
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile_alpine
32 lines (24 loc) · 1.25 KB
/
Dockerfile_alpine
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
##################################################
FROM alpine:3.10 as rocksdb
WORKDIR /source
RUN apk upgrade && apk add git build-base linux-headers bash perl
RUN git clone --branch v6.4.6 https://github.com/facebook/rocksdb.git .
RUN make shared_lib
RUN strip librocksdb.so
##################################################
FROM mcr.microsoft.com/dotnet/core/sdk:3.0.101-alpine3.10 AS build
COPY . /source
RUN apk upgrade && apk add git
RUN cd source/ && git submodule update --init src/Dirichlet src/rocksdb-sharp
RUN dotnet publish /source/src/Nethermind/Nethermind.Runner --configuration Release --output /artifacts
##################################################
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0.1-alpine3.10
COPY scripts/entrypoint.sh /entrypoint.sh
RUN apk upgrade && apk add gosu snappy-dev --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ && rm -rf /var/cache/apk/* && \
addgroup -g 1337 nethermind && adduser nethermind -u 1337 -D -G nethermind && \
chmod +x /entrypoint.sh && \
mkdir /data
COPY --from=build --chown=nethermind:nethermind /artifacts /nethermind
COPY --from=rocksdb --chown=nethermind:nethermind /source/librocksdb.so /nethermind/librocksdb.so
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 8545 30303 30303/udp