2018-06-02 03:22:02 +02:00
|
|
|
FROM ubuntu:xenial
|
2017-05-26 14:18:17 +02:00
|
|
|
MAINTAINER Parity Technologies <devops@parity.io>
|
2018-06-02 03:22:02 +02:00
|
|
|
#set ENVIROMENT
|
|
|
|
ARG TARGET
|
|
|
|
ENV TARGET ${TARGET}
|
|
|
|
|
2017-05-26 14:18:17 +02:00
|
|
|
# install tools and dependencies
|
2018-06-02 03:22:02 +02:00
|
|
|
RUN apt update && apt install -y --no-install-recommends openssl libudev-dev file
|
|
|
|
|
2017-05-26 14:18:17 +02:00
|
|
|
# show backtraces
|
2018-06-02 03:22:02 +02:00
|
|
|
ENV RUST_BACKTRACE 1
|
|
|
|
|
2017-05-26 14:18:17 +02:00
|
|
|
#cleanup Docker image
|
2018-06-02 03:22:02 +02:00
|
|
|
RUN apt autoremove -y
|
|
|
|
RUN apt clean -y
|
|
|
|
RUN rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
#add TARGET to docker image
|
|
|
|
COPY artifacts/$TARGET /usr/bin/$TARGET
|
|
|
|
|
|
|
|
# Build a shell script because the ENTRYPOINT command doesn't like using ENV
|
|
|
|
RUN echo "#!/bin/bash \n ${TARGET} \$@" > ./entrypoint.sh
|
|
|
|
RUN chmod +x ./entrypoint.sh
|
|
|
|
|
2017-05-26 14:18:17 +02:00
|
|
|
# setup ENTRYPOINT
|
|
|
|
EXPOSE 8080 8545 8180
|
2018-06-02 03:22:02 +02:00
|
|
|
ENTRYPOINT ["./entrypoint.sh"]
|