Semaphore fully supports continuous integration and deployment with Docker. Docker’s container technology can be used in various use cases. You can learn more about these use cases in the official Docker documentation.
To start using Docker tools, switch your Semaphore project to using the Docker
Project Settings > Platform.
Semaphore’s Docker platform has Docker 1.12.3, docker-machine 0.8.2, and docker-compose 1.8.0 pre-installed, so you’ll be ready to use the Docker CLI once you’ve made the switch in your build commands.
To avoid including the project’s dependency cache
in Docker’s build context, add
.semaphore-cache to the
in your repository. This step is done automatically when you use
Caching Docker images
Docker images can be cached using the included
docker-cache tool. Add
docker-cache restore to your project’s setup commands
to load the cached images. Images can be saved by adding
as an after job
command. Note that only tagged images will be stored.
To learn more about using Docker, please consult the following guides:
- Setting up a continuous integration for a Docker project on Semaphore
- Testing multi-container applications with Docker Compose and Semaphore
- Semaphore’s integrations with container registries
If you have questions about using Docker that are not covered here, please contact us.