openethereum/scripts/docker/alpine/Dockerfile

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1011 B
Docker
Raw Normal View History

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 \
2020-09-22 14:53:52 +02:00
rust \
git
2020-09-22 14:53:52 +02:00
WORKDIR /openethereum
COPY . /openethereum
RUN cargo build --release --features final --target x86_64-alpine-linux-musl --verbose
RUN strip target/x86_64-alpine-linux-musl/release/openethereum
FROM alpine:edge
# show backtraces
ENV RUST_BACKTRACE 1
2020-09-22 14:53:52 +02:00
# curl and jq are installed to help create health and readiness checks on Kubernetes
RUN apk add --no-cache \
libstdc++ \
eudev-libs \
2020-09-22 14:53:52 +02:00
libgcc \
curl \
jq
2020-09-22 14:53:52 +02:00
RUN addgroup -g 1000 openethereum \
&& adduser -u 1000 -G openethereum -s /bin/sh -D openethereum
2020-09-22 14:53:52 +02:00
USER openethereum
EXPOSE 8080 8545 8180
2020-09-22 14:53:52 +02:00
WORKDIR /home/openethereum
2020-09-22 14:53:52 +02:00
RUN mkdir -p /home/openethereum/.local/share/io.parity.ethereum/
COPY --chown=openethereum:openethereum --from=builder /openethereum/target/x86_64-alpine-linux-musl/release/openethereum ./
2020-09-22 14:53:52 +02:00
ENTRYPOINT ["/home/openethereum/openethereum"]