2018-08-10 10:45:04 +02:00
|
|
|
FROM alpine:edge AS builder
|
|
|
|
|
|
|
|
# show backtraces
|
|
|
|
ENV RUST_BACKTRACE 1
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
build-base \
|
|
|
|
cargo \
|
|
|
|
cmake \
|
|
|
|
eudev-dev \
|
|
|
|
linux-headers \
|
|
|
|
perl \
|
|
|
|
rust
|
2018-05-09 23:28:16 +02:00
|
|
|
|
2018-08-10 10:45:04 +02:00
|
|
|
WORKDIR /parity
|
|
|
|
COPY . /parity
|
|
|
|
RUN cargo build --release --target x86_64-alpine-linux-musl --verbose
|
|
|
|
RUN strip target/x86_64-alpine-linux-musl/release/parity
|
2018-05-09 23:28:16 +02:00
|
|
|
|
2018-08-10 10:45:04 +02:00
|
|
|
|
|
|
|
FROM alpine:edge
|
2018-05-09 23:28:16 +02:00
|
|
|
|
|
|
|
# show backtraces
|
|
|
|
ENV RUST_BACKTRACE 1
|
|
|
|
|
2018-08-10 10:45:04 +02:00
|
|
|
RUN apk add --no-cache \
|
|
|
|
libstdc++ \
|
|
|
|
eudev-libs \
|
|
|
|
libgcc
|
2018-05-09 23:28:16 +02:00
|
|
|
|
2018-08-10 10:45:04 +02:00
|
|
|
RUN addgroup -g 1000 parity \
|
|
|
|
&& adduser -u 1000 -G parity -s /bin/sh -D parity
|
2018-05-09 23:28:16 +02:00
|
|
|
|
2018-08-10 10:45:04 +02:00
|
|
|
USER parity
|
2018-05-09 23:28:16 +02:00
|
|
|
|
|
|
|
EXPOSE 8080 8545 8180
|
2018-08-10 10:45:04 +02:00
|
|
|
|
|
|
|
WORKDIR /home/parity
|
|
|
|
|
|
|
|
RUN mkdir -p /home/parity/.local/share/io.parity.ethereum/
|
|
|
|
COPY --chown=parity:parity --from=builder /parity/target/x86_64-alpine-linux-musl/release/parity ./
|
|
|
|
|
|
|
|
ENTRYPOINT ["./parity"]
|