Docker does not save to volumes.
I have tried different combinations, but it just doesn't save to the volumes. None of them save to the volumes...
I run them with the commands:
$ sudo docker-compose up -d --remove-orphans
$ sudo docker-compose start
If i stop and start the docker containers, then the data is there again (that means that docker saves the data somewhere.. just not in the volumes I specified)
My Host machine is running ubuntu 20.04
What to do?
// docker-compose.yml
version: "3.7"
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04
ports:
- "1433:1433"
- "5022:5022"
volumes:
- /media/m/DataLinux/Code/Docker/db-playground/sqldata:/var/opt/sqlserver/data
# - /media/m/DataLinux/Code/Docker/db-playground/sqlbackup:/var/opt/mssql/backups
# - /media/m/DataLinux/Code/Docker/db-playground/sqlserver:/var/opt/sqlserver
# - /media/m/DataLinux/Code/Docker/db-playground/mssql:/var/opt/mssql
environment:
USERID: sa
SA_PASSWORD: Dev1234!
ACCEPT_EULA: Y
mongo:
image: amd64/mongo:4.4.3-bionic
restart: always
volumes:
- /media/m/DataLinux/Code/Docker/db-playground/mongo-data:/var/data
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: secret
postgres:
image: supabase/postgres:0.14.0
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgres # user: postgres
# volumes:
# sqldata:
# mongo-data:
# sqlsystem:
# sqllog:
# sqlbackup:
# sqlsecrets: