Newer
Older
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
# ------------------------------------------------------------------------------
# Build Stage
# ------------------------------------------------------------------------------
# Building for Debian buster because we need the binary to be compatible
# with the image paritytech/ci-linux:production (currently based on
# debian:buster-slim) used by the gitlab CI
FROM rust:1-buster as build
WORKDIR /root
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
clang
# Copy source tree
COPY . .
# build duniter
ARG threads=1
RUN test -x build/duniter || \
( \
CARGO_PROFILE_RELEASE_LTO="true" \
cargo build --release -j $threads && \
mkdir -p build && \
mv target/release/duniter build/ \
)
# ------------------------------------------------------------------------------
# Final Stage
# ------------------------------------------------------------------------------
FROM debian:buster-slim
LABEL maintainer="Gilles Filippini <gilles.filippini@pini.fr>"
LABEL version="0.0.0"
LABEL description="Crypto-currency software (based on Substrate framework) to operate Ğ1 libre currency"
# Intall
COPY --from=build /root/build/duniter /usr/local/bin/duniter
COPY docker/docker-entrypoint /usr/local/bin/
# Configuration
# rpc, rpc-ws, p2p, telemetry
EXPOSE 9933 9944 30333 9615
VOLUME /var/lib/duniter
ENTRYPOINT ["docker-entrypoint"]