Can't make data stay in docker image

fribse
edited June 2021 in STOR2RRD
I got everything up and running, and it looked fine, but it really isn't :-)
I got the SANs, fsw's, users set up, and I did the config like this:

  stor2rrd:
    image: xorux/stor2rrd
    restart: always
    volumes:
      - stor2rrd:/home
      - /dockercompose/stor2rrd/keys/:/home/stor2rrd/.ssh

  nginx:
    image: nginx
    ports:
      - "443:443"
      - "80:80"
    volumes:
      - /dockercompose/nginx/:/etc/nginx/
    restart: unless-stopped

volumes:
  stor2rrd:

But if I do a docker-compose down and docker-compose up -d data is gone?
Aren't my volumes correctly set up?

I have other containers running like this, though I havent tried mapping a volume, and then pick a subfolder of that, and pull it outside the container.

Comments

  • Jirka
    edited June 2021
    Hello,

    don't mount /home dir, but /home/stor2rrd only:
    services:
        stor2rrd:
            image: xorux/stor2rrd
            restart: always
            volumes:
                - stor2rrd:/home/stor2rrd
                - stor2rrd-keys:/home/stor2rrd/.ssh
    volumes:
        stor2rrd:
        stor2rrd-keys:
    Please pull latest xorux/stor2rrd first with fixed SSH keygen - now it generates new pair only on the first run when /home/stor2rrd data structure is created.

    Let us know please


Sign In or Register to comment.