Docker
Docker is a tool that packages an application and everything it needs to run into a portable unit called a container. This makes software run the same way on any machine, removing 'it works on my machine' problems.
Git & DevOps
You describe your app's environment in a Dockerfile, build it into an image, and run that image as a container. Containers are lightweight and start in seconds because they share the host's operating system kernel.
Docker is a cornerstone of modern DevOps because it makes environments reproducible and deployments consistent from a laptop to the cloud.
Examples
Bash — A Dockerfile defines how to build an image. Build and run with: docker build -t myapp . && docker run myapp
# Dockerfile
FROM node:20
WORKDIR /app
COPY . .
RUN npm install
CMD ["node", "server.js"]