Odoo is an all-in-one management software that offers a range of business applications that form a complete suite of enterprise management applications targeting companies of all sizes. Odoo is an all-in-one business software including CRM, Website/e-Commerce, billing, accounting, manufacturing, warehouse- and project management, and inventory.
And Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.
Here i will explain how to setup the docker container and deploy odoo in windows.
Docker on windows is little bit different since docker uses linux properties which windows does not support.So we will be installing a virtual machine on windows and docker images will run on them. But you can control them through windows. It sounds like a difficult task, but the docker has provided with us
docker toolbox which will handle everything that i said. You can download that from here.
Download it and install through the setup wizard. I would suggest to go for a full installation including docker compose, kitematic and VirtualBox(if you do not have installed), git(since docker is linux it uses git bash to run commands). After the installation it will show two shortcuts ,a
Quickstart terminal and
Kitematic Alpha. Open the Quickstart terminal and it will run some commands which are used to setup the virtualbox. If it is successfull it will show the docker command line with ascii docker whale and the ip address of the docker.
The ip address of the docker is very important since we use that to access the Odoo. If you forget it, we can use a simple command that i provided below.
To test it, we can run a simple docker container by executing following. For more docker containers we can visit the docker hub , which is more like git repository.
It only output some text to the terminal but it is a great way to test the docker.
For configuring Odoo we have to first setup PostgreSQL image on docker and link that to the Odoo.
In above code the
--name is the name of the docker container. We can use that to start and stop the container.
-p is the port no: that docker needed to expose to outside.
For start and stop servers we can use the following commands. After you run
docker run command once don't run it again, unless you are planning for multiple instance of Odoo. Use below commands instead. Because it will download latest version again and will occupy more space.
For more information on this you can visit the following link. Now you can check the Odoo running on
To run docker using commandline we can use some flags that is provided by docker. You can get the list of all the commands by typing
docker --help or going to there reference docs. I have listed frequently used docker commands below.
Try running Odoo with Docker with this setup.