To enter a running Docker container, you can use the attach command. E.g:
- docker attach <container name or ID>
Though, that is mostly useful for debugging purposes. If you want to edit files directly, I'd suggest doing so before building the Docker images.
In the linked tutorial, you run the command
make build. If you look at the actual Makefile in the project, you'll see that it is building Docker images:
cd mongod; docker build $(DOCKER_BUILD_OPTS) -t mongod .
cd opa; docker build $(DOCKER_BUILD_OPTS) -t opa .
cd peps; docker build $(DOCKER_BUILD_OPTS) -t peps .
cd solr; docker build $(DOCKER_BUILD_OPTS) -t solr .
cp domain smtpin/
cd smtpin; docker build $(DOCKER_BUILD_OPTS) -t smtpin .
cp domain smtpout/
cd smtpout; docker build $(DOCKER_BUILD_OPTS) -t smtpout .
The cleanest way to modify this would be to edit the Dockerfile that produces the PEPS image. From there you could add or replace the files as needed.
For more information on building Docker images, check check out:
Docker containers are created by using [base] images. An image can be a basic one with nothing but the operating-system fundamentals, or it can consist of a sophisticated pre-built application stack - ready for launch. When building your images with docker, each action taken (i.e. a command executed such as apt-get install) forms a new layer on top of the previous one. These base images then can be used to create new containers. In this DigitalOcean article, we will see about automating this process as much as possible, as well as showing you the best practices and methods to make most of docker and containers by using Dockerfiles: scripts to build containers, step-by-step, layer-by-layer, automatically from a source (base) image.