Answers for "docker compose volumes"

1

volumes docker compose

version: "2.4"
services:
  web:
    image: nginx:alpine
    ports:
      - "80:80"
    volumes:
      - type: volume
        source: mydata
        target: /data
        volume:
          nocopy: true
      - type: bind
        source: ./static
        target: /opt/app/static

networks:
  webnet:

volumes:
  mydata:
Posted by: Guest on April-04-2021
9

docker mount volume

docker run -v /host/directory:/container/directory -other -options image_name command_to_run
Posted by: Guest on September-16-2020
3

docker compose volumes

/host/path:/container/path
Posted by: Guest on April-05-2021
0

docker create volume

$ docker volume create hello

hello

$ docker run -d -v hello:/world busybox ls /world
Posted by: Guest on October-05-2020
0

healthcheck docker compose

healthcheck:
  test: ["CMD", "curl", "-f", "http://localhost"]
  interval: 1m30s
  timeout: 10s
  retries: 3
  start_period: 40s
Posted by: Guest on November-25-2020
0

docker volumes copy content

CID=$(docker run -d -v hello:/hello busybox true)
docker cp $CID:/hello ./
Posted by: Guest on January-30-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language