mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
6699b0228f
* contrib: set the working directory to /src/dash to allow for cloning gitian dependencies * contrib: place the home directory inside /home instead of root * contrib: add notes about sharing ccache across the network * contrib: chown based on the (u/g)id env vars instead of the associated username * contrib: reduce layer count by reducing run invocations * contrib: develop container cleanup and maintenance - add apt-cacher-ng, gpg, lsb-release, screen as a package dependencies - reorder packages in alphabetical order - correct documentation - create and add user to the docker group to satisfy Gitian's needs - reduce the number of RUN calls to reduce layer count
48 lines
1.2 KiB
Docker
48 lines
1.2 KiB
Docker
# syntax = edrevo/dockerfile-plus
|
|
|
|
FROM ubuntu:focal
|
|
|
|
INCLUDE+ ci/Dockerfile
|
|
|
|
# The inherited Dockerfile switches to non-privileged context and we've
|
|
# just started configuring this image, give us root access
|
|
USER root
|
|
|
|
# Make development environment more standalone
|
|
RUN apt-get update && \
|
|
apt-get install $APT_ARGS \
|
|
apt-cacher-ng \
|
|
gdb \
|
|
gpg \
|
|
lsb-release \
|
|
nano \
|
|
openssh-client \
|
|
screen \
|
|
sudo \
|
|
zsh \
|
|
&& \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Discourage root access, this is an interactive instance
|
|
#
|
|
# Sometimes these commands are run repetitively _after_ the non-sudo
|
|
# user was introduced and therefore these commands would fail
|
|
# To mitigate the build halting, you can add "|| true" so that it
|
|
# unconditionally returns 0
|
|
#
|
|
# Also, we create the group `docker` and add our user to it to meet
|
|
# Gitian's requirements
|
|
#
|
|
RUN groupadd docker && \
|
|
usermod -aG sudo,docker dash && \
|
|
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
|
|
# Disable noninteractive mode
|
|
ENV DEBIAN_FRONTEND="dialog"
|
|
|
|
# Expose Dash P2P and RPC ports for main network and test networks
|
|
EXPOSE 9998 9999 19998 19999
|
|
|
|
# We're done, switch back to non-privileged user
|
|
USER dash
|