Site Tools


docker

Installation sur Ubuntu

$ apt-get remove docker docker-engine docker.io containerd runc

$ apt update

$ apt install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -

$ add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

$ apt update

$ apt install docker-ce docker-ce-cli containerd.io

Inspect container :

docker inspect -f '{{ json .Mounts }}' <container_id> | python3 -m json.tool

Copy a dump file from the host system to one of the volumes

docker cp </path/to/dump/in/host> <container_name>:<path_to_volume>

Execute pg_restore via docker exec command

docker exec <container_name> pg_restore -U <database_owner> -d <database_name> <path_to_dump>

Checks :

docker run -it --network=nw1 --link db41:postgres postgres psql "postgresql://odoo:Rd32kUzEbQGNbA@postgres/postgres" -l
docker.txt · Last modified: 2019/10/29 08:32 by 89.95.221.183