Semaphore/deployment/docker
2024-05-24 15:18:12 +02:00
..
dredd ci: execute dredd without containers 2024-05-04 01:16:31 +02:00
runner ci(docker): disable node_modules cache for runner too 2024-05-21 22:04:56 +02:00
server docs(docker): add todo 2024-05-24 15:18:12 +02:00
README.md feat: restructure whole docker build process 2024-04-28 00:15:05 +02:00

Docker

Generally we are building production-grade images for each tag, latest and even for the development branch which will be pushed to DockerHub. If you still need to build your own image you can easily do that, you just need install Docker and Task on your system.

If you just want to use our pre-built images please follow the instructions on our documentation.

If you want to use docker-compose to start Semaphore you could also read about it on our documentation or take a look at our collection of snippets within this repository.

Build

We have prepared multiple tasks to build an publish container images, including tasks to verify the image contains all required tools:

task docker:build
task docker:push

If you want to customize the image names or if you want to use Podman instead of Docker you are able to provide some set of environment variables to the Task command:

  • DOCKER_ORG: Define a custom organization for the image, defaults to semaphoreui
  • DOCKER_SERVER: Define a different name for the server image, defaults to semaphore
  • DOCKER_RUNNER: Define a different name for the runner image, defaults to runner
  • DOCKER_CMD: Use another command to build the image, defaults to docker

Test

We defined tasks to handle some linting and to verify the images contain the tools and binaries that are required to run Semaphore. Here we are using Hadolint to ensure we are mostly following best-practices and Goss which is using a configuration file to define the requirements.

To install the required tools you also need to install Golang on your system, the installation of Golang is not covered by us.

The installation of the dependencies can be customized by providing environment variables for INSTALL_PATH (/usr/local/bin) and REQUIRE_SUDO (true).

task docker:test