This project is sample code of two Dockerfiles.
Note that Docker is not supported for Windows Subsystem for Linux 1 (WSL1).
Ensure that Docker is installed and running.
- Install Docker
- Add your user to the Docker group:
sudo usermod -aG docker $(whoami)
- Logout and login again, to ensure that your group information is fully loaded
- Start the Docker daemon:
sudo systemctl start docker
On subsequent reboots of your computer, you will only need to start the docker daemon.
You can use the sudo systemctl enable docker
command to automatically start the Docker daemon on every reboot.
docker build -t ubuntu_node ubuntu_node/
to build the project inubuntu_node/
and tag withubuntu_node
docker build -t docker_node docker_node/
to build the project indocker_node/
and tag withdocker_node
docker image ls
to view all the container imagesdocker run --rm ubuntu_node
to run the default command of theubuntu_node
containerdocker run --rm docker_node
to run the default command of thedocker_node
container