How-to: Add Base Containers
To add a base container with the name “my_container
”, do the following steps:
- Create a sub-directory with the name
my_container
in the following directory:csle/emulation-system/base_images/docker_files
Listing 154: Directory with base Docker images.
- Add a Dockerfile to the following directory:
csle/emulation-system/base_images/docker_files/my_container
Listing 155: Directory with the Dockerfile of a container with the name `my_container`.
- Add build and push instructions to the following Makefile:
csle/emulation-system/base_images/Makefile
Listing 156: Makefile for base Docker images.
- Update the following README file:
csle/emulation-system/base_images/README.md
Listing 157: README file for base Docker images.
- Build and push the image to DockerHub by running the commands:
cd csle/emulation-system/base_images; make my_container cd csle/emulation-system/base_images; make push_my_container
Listing 158: Commands to build and push the base Docker image `my_container` to DockerHub.
- Previous
- Next