How it works…

Docker allows you to create system images and then ship them around to run them on other servers. Docker images are created by writing a Dockerfile, which describes how to add layers generally to a pre-existing Dockerfile. The Docker images are hosted at https://hub.docker.com, and, in this recipe, we have used official images of PostgreSQL and Odoo.

Before running the Odoo instance container, we need to set up a container for PostgreSQL. In the first step, we ran the Docker image for PostgreSQL 10. The command will search for thePostgreSQL Docker image. If it is not available in your system, Docker will download it. In the command, we passed the --name db option. Here, db will be the name of the PostgreSQL container. In step 2, we started the Docker container for PostgreSQL.

In step 3, we ran the Docker image for Odoo. This runs the Odoo instance on port 8069. If you want to run the command with a different configuration, you can use different options. Here are some examples of how to run the Odoo instance with custom options discussed further.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset