2

The Portainer docs are saying:

The -v /opt/portainer:/data option will persist Portainer data in /opt/portainer on the host where Portainer is running. You can specify another location on your filesystem.

I just created the following docker-compose:

portainer:
  image: portainer/portainer
  container_name: portainer
  volumes:
    - /opt/portainer:/data
    - /var/run/docker.sock:/var/run/docker.sock
  ports:
    - 9000:9000

But I don't get a folder /opt/portainer. It seems, that the volume configuration does not work as described in the docs.

Dennis
  • 128
  • 7

1 Answers1

3

docker-compose is expecting the /opt/portainer folder to exist first. Once you create that, you should stop getting the error.

David Birks
  • 366
  • 1
  • 5
  • 3
    I used the volumes-option quite a lot before. I'm not sure that I ever created the folder first. But that works. Gosh. – Dennis Oct 12 '17 at 14:56