anyone who is new to Odoo or even experienced developers may have a problem in install odoo in there local devices,So I'm going to show few tips to run odoo using docker.
đź”” first this technique assume that you are running a linux distribution like (ubuntu, debian, redhat, ...).
now let's do it.
- we are going to install Docker CE using https://get.docker.com/ if you already have it installed skip this step to check if you have docker install run
docker info
it's going to show details of the current version of docker installed if not run :
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
after that add the your user to the docker group
sudo usermod -aG docker $USER
where $USER is the name of the user
- we are going to create a new postgres database server container(don't worry if you don't understand the meaning of the container you can check at docker )
docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name postgres_db postgres:10
- Now we can start an odoo server
docker run -p 8070:8069 --name odoo --link postgres_db:db -t odoo
this is going to start latest odoo version which is 13 (in the day the post written)
now in your browser go to http://localhost:8070 and 🎉
and to stop it run
docker stop odoo
to start it run
docker start odoo
to run other versions of odoo just change the tag to odoo:11.0, or odoo:12.0
like
docker run -p 8071:8069 --name odoo --link postgres_db:db -t odoo:11.0
🤔 now what about custom addons ❓
đź’ˇ we have volumes to add modules to the server.
docker run -v /path/to/addons:/mnt/extra-addons -p 8069:8069 --name odoo
--link postgres_db:db -t odoo
Top comments (2)
What version of Postgres do you recommend for Odoo 13.0 docker image?
I normally use 11.5 but i'm not that is the best option.
any version from 10 and upper would be good.