- English
- English
Appearance
Appearance
Docker lets you run an application together with everything it needs inside a container. This can include the runtime, libraries, configuration, and application files. A container is an isolated environment that can run the same way on your laptop, a teammate's laptop, or a server.
Without Docker, project setup often leads to the familiar problem: “It works on my machine, but not on the server.” The Node version may be different, an OS library may be missing, or a database may not be installed. With Docker, your laptop and server can run the same application package, called an image, so the environment stays more consistent.
At work, Docker is commonly used for these purposes:
Keeping environments consistent. The app, runtime, and libraries are packaged into an image. A new team member can run docker compose up instead of following a long setup guide.
Isolating dependencies. You can run PostgreSQL 16 for project A and PostgreSQL 14 for project B on the same machine without conflicting global installations.
Running several services together. A web app rarely runs alone. It often needs a database, Redis, or a queue. Docker and Compose can run these services as connected containers.
Common use cases include local development, running dependencies in CI, and deploying a built image to a server or a platform that supports containers. Here, a dependency means a service the app needs, such as a database or Redis. Now that you know when Docker is useful, continue to the mental model of images, containers, and registries.