Junior — Middle
What are the main commands and tools used when working with Docker?
sobes.tech AI
Answer from AI
The most commonly used commands and tools when working with Docker are:
docker build— creating an image from a Dockerfile.docker run— running a container from an image.docker ps— viewing running containers.docker images— viewing local images.docker stopanddocker rm— stopping and removing containers.docker pullanddocker push— downloading and uploading images to/from a registry.docker exec— executing commands inside a running container.
Tools:
- Docker CLI — the main command-line interface.
- Docker Compose — for describing and running multi-container applications via a YAML file.
Example of running a Python container:
docker run -it --rm python:3.9 python
This will start an interactive Python session inside the container.