0

I have got a docker compose file that uses a volume, then I check that the volume is created while my container is running.

enter image description here

Then I go to the folder where the volumes are stored in docker desktop, but the folder is empty.

enter image description here

this is my docker-compose.yml

version: "3.3"

services:

  backnode:
    restart: always
    build:
      context: .
    image: foo-backnode:1.0.0
    env_file: docker-compose.env
    volumes: 
      - html:/var/log/foo
    networks:
      - internal
    ports: 
      - "3001:3001"

networks:
  internal:
    internal: false

volumes: 
  html:
    external: false

I expect to see the log files produced by my application.

Edit:

All this works properly under linux enviroment (ubuntu).

enter image description here

dlopezgonzalez
  • 4,217
  • 5
  • 31
  • 42
  • You can't directly access the contents of named volumes. Bind-mount a host directory, or set up your application to log to stdout and review the `docker logs`. – David Maze Feb 25 '21 at 16:05
  • Yes I do, in linux the directory is /var/lib/docker/volumes/[volume_name]/, i can see the files (check the main post, i have edited with a screenshot) – dlopezgonzalez Feb 26 '21 at 09:03

0 Answers0