Category Archives: docker-compose

WHAT’S THE DIFFERENCE BETWEEN UP,RUN, AND START?

What’s the difference between up, run, and start?

Typically, you want docker-compose up. Use up to start or restart all the services defined in a docker-compose.yml.

The docker-compose run command is for running “one-off” or “adhoc” tasks. It requires the service name you want to run and only starts containers for services that the running service depends on. Use run to run tests or perform an administrative task such as removing or adding data to a data volume container.

The docker-compose start command is useful only to restart containers that were previously created, but were stopped. It never creates new containers.