Files
sablier/docs/providers/docker.md
Alexis Couvreur acfd612bc0 ci: fix pipelines (#418)
* ci: fix pipelines

* fix(proxywasm): bump to go 1.23 and tinygo 0.33

* ci: move to sablierapp/sablier

* ci: replace sablierapp/whoami with acouvreur/whoami

This will use mimic later

* fix wrong whoami image

* update nginx docker image for proxywasm
2024-10-23 18:13:56 -07:00

1.3 KiB

Docker

The Docker provider communicates with the docker.sock socket to start and stop containers on demand.

Use the Docker provider

In order to use the docker provider you can configure the provider.name property.

File (YAML)

provider:
  name: docker

CLI

sablier start --provider.name=docker

Environment Variable

PROVIDER_NAME=docker

!> Ensure that Sablier has access to the docker socket!

services:
  sablier:
    image: sablierapp/sablier:1.8.1-beta.22
    command:
      - start
      - --provider.name=docker
    volumes:
      - '/var/run/docker.sock:/var/run/docker.sock'

Register containers

For Sablier to work, it needs to know which docker container to start and stop.

You have to register your containers by opting-in with labels.

services:
  whoami:
    image: acouvreur/whoami:v1.10.2
    labels:
      - sablier.enable=true
      - sablier.group=mygroup

How does Sablier knows when a container is ready?

If the container defines a Healthcheck, then it will check for healthiness before stating the ready status.

If the containers does not define a Healthcheck, then as soon as the container has the status started