parity-zcash/docker/hub/Dockerfile

50 lines
1.2 KiB
Docker
Raw Normal View History

# This Dockerfile uses Docker Multi-Stage Builds
# See https://docs.docker.com/engine/userguide/eng-image/multistage-build/
# Build image
2018-02-11 23:37:54 -08:00
FROM rust:1.23-jessie AS build
2017-05-12 07:31:20 -07:00
#ENV for build TAG
ARG BUILD_TAG
ENV BUILD_TAG=${BUILD_TAG:-master} \
PATH=/root/.cargo/bin:$PATH \
RUST_BACKTRACE=1
WORKDIR /build
2017-05-12 07:31:20 -07:00
RUN echo $BUILD_TAG
2017-05-12 07:31:20 -07:00
# install tools and dependencies
RUN apt-get update && \
apt-get install -y --force-yes --no-install-recommends \
g++ \
build-essential \
curl \
git \
file \
binutils \
2017-05-12 10:36:22 -07:00
ca-certificates \
2017-05-12 07:31:20 -07:00
libssl-dev \
pkg-config \
libudev-dev
2017-05-12 07:31:20 -07:00
# build pbtc-ubuntu
RUN git clone https://github.com/paritytech/parity-bitcoin
WORKDIR /build/parity-bitcoin
RUN git pull
RUN git checkout $BUILD_TAG
RUN cargo build --verbose --release
RUN strip /build/parity-bitcoin/target/release/pbtc
RUN file /build/parity-bitcoin/target/release/pbtc
# Runtime image, copies pbtc artifact from build image
FROM ubuntu:16.04 AS run
LABEL maintainer "Parity Technologies <devops@parity.io>"
WORKDIR /pbtc-ubuntu
COPY --from=build /build/parity-bitcoin/target/release/pbtc/ /pbtc-ubuntu/pbtc-ubuntu
2017-05-12 07:31:20 -07:00
# setup ENTRYPOINT
EXPOSE 8333 18333 8332 18332
ENTRYPOINT ["/pbtc-ubuntu/pbtc-ubuntu"]