Intern
What is Docker, Docker Image, Docker Compose?
sobes.tech AI
Answer from AI
Docker is a platform for building, shipping, and running applications in isolated containers. Containers allow you to package an application with all its dependencies, ensuring consistent operation on any system.
Docker Image is a template or a 'snapshot' of a container, containing all the necessary files, libraries, and configurations to run an application. A container is created from an image.
Docker Compose is a tool for defining and running multi-container Docker applications. Using a docker-compose.yml file, you can describe multiple services, their relationships, networks, and volumes, and then start everything with a single command.
Example docker-compose.yml:
version: '3'
services:
web:
image: nginx
ports:
- "80:80"
db:
image: postgres
environment:
POSTGRES_PASSWORD: example