Docker
Docker is used to create containers. In a container system resources are separated from each other e.g. to create a development environment where the developer can experiment freely without the risk of jeopardizing the host system.
A dockerfile defines what will be in the docker image, running the image will create a container.
- Installation
apt install docker.io apt install docker-buildx
- This creates a working container
- Dockerfile in /etc/docker
FROM ubuntu
LABEL name="Hans de Ridder"
RUN apt-get update
CMD ["bash", "-i"]
- docker build /etc/docker
- This build the image
- docker image ls
- List all existing images
- docker run -it <image ID>
- Create the container and open a bash prompt in it. When leaving the shell the container is closed