docker-bind
docker-bind copied to clipboard
Loose config during restart bind running in a docker container
Hi all,
I setup a docker container using the docker-compose.yml as described in the documentation here. It works for some tests. But when I restart the container it looses all configurations except the configs in the mapped data-folder (/data). In my case I adjusted the mapping to use a docker volume for the persistence of the data-folder and this works. I would like to do this also for the other configurations: What is to do to retain bind configurations like additional accounts, changed password, updates of the application and so on. It seems these informations aren't stored in the data-folder. How to setup the docker-compose.yml to map the folder with these data to a persistent folder at the underlying storage of the computer.
My docker-compose.yml looks like this:
version: '3.7'
services: bind: restart: always image: sameersbn/bind:latest #9.16.1-20200524 dns: - "www.xxx.yyy.zzz" ports: - "53:53/udp" - "53:53/tcp" - "10000:10000/tcp" volumes: - data_volume:/data:rw
volumes: data_volume: external: false
Used Docker:
docker version Client: Cloud integration: v1.0.22 Version: 20.10.12 API version: 1.41 Go version: go1.16.12 Git commit: e91ed57 Built: Mon Dec 13 11:46:56 2021 OS/Arch: darwin/amd64 Context: default Experimental: true
Server: Docker Desktop 4.5.0 (74594) Engine: Version: 20.10.12 API version: 1.41 (minimum version 1.12) Go version: go1.16.12 Git commit: 459d0df Built: Mon Dec 13 11:43:56 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.12 GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d runc: Version: 1.0.2 GitCommit: v1.0.2-0-g52b36a2 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info Client: Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc., v0.7.1) compose: Docker Compose (Docker Inc., v2.2.3) scan: Docker Scan (Docker Inc., v0.17.0)
Server: Containers: 1 Running: 1 Paused: 0 Stopped: 0 Images: 1 Server Version: 20.10.12 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 2 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc Default Runtime: runc Init Binary: docker-init containerd version: 7b11cfaabd73bb80907dd23182b9347b4245eb5d runc version: v1.0.2-0-g52b36a2 init version: de40ad0 Security Options: seccomp Profile: default cgroupns Kernel Version: 5.10.76-linuxkit Operating System: Docker Desktop OSType: linux Architecture: x86_64 CPUs: 4 Total Memory: 7.774GiB Name: docker-desktop ID: UMTE:JEVU:7TB6:AL3C:K2KD:XSTM:OBS6:IJKQ:P7BE:VYBI:BE7P:22YN Docker Root Dir: /var/lib/docker Debug Mode: false HTTP Proxy: http.docker.internal:3128 HTTPS Proxy: http.docker.internal:3128 No Proxy: hubproxy.docker.internal Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: hubproxy.docker.internal:5000 127.0.0.0/8 Live Restore Enabled: false
Thanks in advance.
Best regards, Thomas