...
Code Block |
---|
docker volume create db-vol docker run -d --name database --network autosol --mount source=db-vol,target=/var/lib/postgresql/data --restart always -e POSTGRES_PASSWORD=postgres postgres_tar: |
Note |
---|
Warning: mounted volumes can preserve bad data as well as good; if a container is created with an error in database name or the wrong architecture .tar is restored, you will need to delete the volumes before a new container can succesfully be run! |
Full Creation Example
Code Block |
---|
docker load -i ./postgres_32.tar docker load -i ./edgemanager3451_32.tar docker network create autosol docker volume create db-vol docker run -d --name database --network autosol --mount source=db-vol,target=/var/lib/postgresql/data --restart always -e POSTGRES_PASSWORD=postgres postgres_tar: docker run -d --name edgemanager --network autosol -p 8080:8080 -p 4840:4840 -p 40000-40010:40000-40010 --restart always edgemanager_32:3.4.5.1 |