Docker Compose - Adding volumes.. help!

7 views
Skip to first unread message

HartfordLUG

unread,
May 14, 2024, 10:22:44 AM5/14/24
to HartfordLUG
Bob, Jack and Rudy,
Hello, Got a quick question.. I have a docker container that I would like to mount a folder as a volume..... I have this backup container that I am trying to start in docker... 
Proxmox tutorial --> 

 The container starts using this docker compose file....


version: '2.1'

services:
  pbs:
    image: ayufan/proxmox-backup-server:${TAG:-latest}
    ports:
      - 8007:8007
    mem_limit: 2G
    volumes:
      - pbs_etc:/etc/proxmox-backup
      - pbs_logs:/var/log/proxmox-backup
      - pbs_lib:/var/lib/proxmox-backup
    tmpfs:
      - /run
    cap_add: # smartctl support
      - SYS_RAWIO
    devices:
      - /dev/sda
      - /dev/sdb
    restart: unless-stopped
    stop_signal: SIGHUP

volumes:
  pbs_etc:
  pbs_logs:
  pbs_lib:


But when I add the volume to this instance ... the whole stack dies..... 
*******************************************
version: '2.1'

services:
  pbs:
    volumes:
      - backups:/backups

volumes:
  backups:
    driver: local
    driver_opts:
      type: ''
      o: bind
      device: /srv/dev-disk-by-label-backups
********************************************
If I try to add a volume the whole stack dies:

Has anyone added this kind of direct mapping to their containers. 

Larry Licata

unread,
May 14, 2024, 10:25:30 AM5/14/24
to HartfordLUG
Its Larry L. BTW asking this ? - LOL Be well gents!

Rudy S

unread,
May 14, 2024, 1:50:43 PM5/14/24
to HartfordLUG
Hello Larry,
I am sorry I am not getting back you right away, I am very sick with over 100 degree temp.
When I get back on my feet, I will look into it for you.
Thanks
Rudy



--
You received this message because you are subscribed to the Google Groups "HartfordLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hartfordlug...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hartfordlug/5b3d06e7-9f26-482b-8b9c-a2b7d5f7abecn%40googlegroups.com.

Larry Licata

unread,
May 14, 2024, 3:12:46 PM5/14/24
to Rudy S, HartfordLUG
No worries feel better! 


From: hartf...@googlegroups.com <hartf...@googlegroups.com> on behalf of Rudy S <r18...@gmail.com>
Sent: Tuesday, May 14, 2024 1:50:39 PM
To: HartfordLUG <hartf...@googlegroups.com>
Subject: Re: Docker Compose - Adding volumes.. help!
 
You received this message because you are subscribed to a topic in the Google Groups "HartfordLUG" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hartfordlug/G8v2OYe5rgA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hartfordlug...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hartfordlug/D47CFB1F-7CF2-4390-A7AC-171CA24E054E%40gmail.com.
Reply all
Reply to author
Forward
0 new messages