Bring up all containers defined in
$SPIN_ENV defaults to
Usage for "spin up"
spin up [OPTIONS]
Force a build of containers on initialization
spin up --build
You can add options at the end of the command (like the
--build shown above. The above command will bring up your containers, but then also force a new build (if you have builds configured in your "docker-compose.dev.yml" file).
spin up command defaults to running:
COMPOSE_FILE=docker-compose.yml:docker-compose.dev.yml docker compose up
--skip-pull: Do not automatically pull docker images.
--force-pull: Pull Docker Compose images, regardless of cache settings.
This command is a shortcut for
docker compose up and can accept additional options that you pass to it. It also does a number of other special things.
- Make sure to have a
docker-compose.ymland by default a
docker-compose.dev.ymlin your project before running
- Spin will automatically pull image updates (only if the machine is connected to the Internet)
- Spin will remove any orphan containers
Let's say you have a few different files in your repository:
Example project root
By default, Spin uses
If you want to change that, you just need to set
Change spin environment
SPIN_ENV=testing spin up
This will essentially run:
Above command will execute this below
COMPOSE_FILE=docker-compose.yml:docker-compose.testing.yml docker compose up