docker compose create volume code example

Example 1: docker create volume

$ docker volume create hello

hello

$ docker run -d -v hello:/world busybox ls /world

Example 2: docker create volume

docker volume create [OPTIONS] [VOLUME]

Example 3: healthcheck docker compose

healthcheck:
  test: ["CMD", "curl", "-f", "http://localhost"]
  interval: 1m30s
  timeout: 10s
  retries: 3
  start_period: 40s

Example 4: docker compose entrypoint

healthcheck:
  test: ["CMD", "curl", "-f", "http://localhost"]
  interval: 1m30s
  timeout: 10s
  retries: 3
  start_period: 40s