2021-12-16 15:14:41 +01:00
|
|
|
# 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
|
|
|
|
|
2022-08-22 21:42:36 +02:00
|
|
|
# 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/*
|
|
|
|
|
2021-12-16 15:14:41 +01:00
|
|
|
# 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
|
2022-08-22 21:42:36 +02:00
|
|
|
# To mitigate the build halting, you can add "|| true" so that it
|
2021-12-16 15:14:41 +01:00
|
|
|
# unconditionally returns 0
|
|
|
|
#
|
2022-08-22 21:42:36 +02:00
|
|
|
# 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
|
2021-12-16 15:14:41 +01:00
|
|
|
|
|
|
|
# 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
|