I should be able to Quit Docker from the tray app, start docker again, and then “docker start” my postgres container and still see all my databases.
My rails test suite says:
PG::ConnectionBad: FATAL: database "rx_test" does not exist
OS X: version 10.11.2 (build: 15C50) Docker.app: version v1.11.1-beta13 Running diagnostic tests: [OK] Moby booted [OK] driver.amd64-linux [OK] vmnetd [OK] osxfs [OK] db [OK] slirp [OK] menubar [OK] environment [OK] Docker [OK] VT-x Docker logs are being collected into /tmp/20160526-133000.tar.gz Most specific failure is: No error was detected Your unique id is: CA263BF5-A5D8-46D6-BB58-26C0079F786A Please quote this in all correspondence.
Here is a snippet of the docker-compose.yml I’m using:
postgres: image: postgres:9.4 ports: - 5432:5432 volumes: - /home/docker/postgres-data:/var/lib/postgresql/data
Steps to reproduce the behavior
- Start the docker-compose with that snippet above
- Run the “rake db:create” to get things setup
- Run test suite to show things working
- Stop docker-compose
- Shutdown docker
- Start docker again and run test suite. You will get an error about missing tables.