Si Docker n'est pas encore installé, aller voir cette page.
docker pull # Pull an image or a repository from a registry tryton/tryton # Image name
docker run # Run a command in a new container --name tryton-postgres # Assign a name to the container -e POSTGRES_PASSWORD=mysecretpassword # Set environment variable POSTGRES_PASSWORD -e POSTGRES_DB=tryton # Set environment variable POSTGRES_DB -d # Run container in background postgres # Image name
docker run # Run a command in a new container --link tryton-postgres:postgres # Add link to another container -it # Interactive + Allocate TTY tryton/tryton # Image name trytond-admin -d tryton --all # Command and arguments
Répondre aux questions suivantes :
docker run # Run a command in a new container --name tryton # Assign a name to the container -p 8000:8000 # Publish a container's port(s) to the host --link tryton-postgres:postgres # Add link to another container -d # Run container in background tryton/tryton # Image name
docker run # Run a command in a new container --name tryton-cron # Assign a name to the container --link tryton-postgres:postgres # Add link to another container -d # Run container in background tryton/tryton # Image name trytond-cron -d tryton # Command and arguments
Pour redémarrer les instances après un redémarrage du serveur, entrer cette commande :
docker start # Start one or more stopped containers tryton-postgres # Image name for PostgreSQL tryton # Image name for Tryton tryton-cron # Image name for cron
L'ordre des conteneurs est important !
Pour tout stopper c'est la même chose, sauf qu'on remplace start
par stop
:
docker stop # Stop one or more running containers tryton-postgres # Image name for PostgreSQL tryton # Image name for Tryton tryton-cron # Image name for cron