forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add dash minimal development environment container
Co-authored-by: UdjinM6 <[email protected]>
- Loading branch information
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
** | ||
!contrib/containers/ci/Dockerfile | ||
!contrib/containers/deploy/Dockerfile | ||
!contrib/containers/develop/Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# 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 | ||
|
||
# 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, we've added "|| true" so that it | ||
# unconditionally returns 0 | ||
# | ||
RUN apt-get update && apt-get install $APT_ARGS sudo && rm -rf /var/lib/apt/lists/* | ||
RUN usermod -aG sudo dash | ||
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | ||
|
||
# Make development environment more standalone | ||
RUN apt-get update && apt-get install $APT_ARGS nano openssh-client zsh gdb && rm -rf /var/lib/apt/lists/* | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
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: /dash-src |