dash/contrib/containers/develop/docker-compose.yml
Kittywhiskers Van Gogh 6699b0228f
docker: fix gitian support, optimize container layer count and improve script consistency (#4983)
* 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
2022-08-22 22:42:36 +03:00

52 lines
1.6 KiB
YAML

version: "3.9"
services:
container:
entrypoint: /bin/bash
build:
context: '..'
dockerfile: './develop/Dockerfile'
tty: true # Equivalent to -t
stdin_open: true # Equivalent to -i
ports:
- "9998:9998" # Mainnet Ports
- "9999:9999"
- "19998:19998" # Testnet Ports
- "19999:19999"
# A note about volumes:
#
# If Docker is interacting with your operating system directly
# without an intermediate VM, then you do not need to change anything
#
# But if not, then you'll need to mount your system's root directory
# (i.e. /) into the boot2docker instance if you want to mirror the exact
# filesystem structure of your host.
#
volumes:
- type: bind
# source: /host/$PWD # Workaround needed on non-Linux hosts
source: ../../..
target: /src/dash
# Sharing your ccache
#
# As the container is supposed to be a reproducible replica of the build
# environment 1:1, it will not interact with your filesystem except as
# defined in this file. This comes with the disadvantage of having to engage
# in repeated re-compilation of object files, which will prolong your build
# times and make the process more arduous. Therefore it is recommended to share
# your local ccache with the container. The example below connects to a remote
# samba share and can be adopted to fit your needs.
#
# NOTE: Only the first line is a continuation of the services.container.volumes
# definition
# - cache:/home/dash/.ccache
#
# volumes:
# cache:
# driver_opts:
# type: cifs
# o: "username=example,password=changemeplsfix"
# device: "//127.0.0.1/cache"