[PYTHON] Use Docker Desktop for Windows to start the latest odo with 2 commands

docker/odoo

Do you know odoo? odoo is famous as an open source ERP implemented in python, but in fact, it is a ** non-coding tool (Odoo Studio) ** for business applications. But there is also.

image.png Odoo Studio: Build an App from Scratch with Zero Coding Experience 2019/11/13

So far, to try odoo, starting with installing Linux, building a python environment, setting postgreSQL as a database, setting a web server, etc. That procedure was necessary. With the advent of Docker, it has become possible to install and start odo with two commands. Of course, it is registered as odoo is also a Docker official image.

Preparation-Installing Docker

Here, on Windows 10, use Docker Desktop for Windows to start the latest doo with 2 commands. First, install Docker Desktop for Windows. https://docs.docker.jp/docker-for-windows/toc.html

Start odo with docker

Since odoo is registered as an official image in Docker Hub, it can be started with two commands.

Command 1-Start database

First, run the PostgreSQL container, which is the database, in the background. The required modules will be installed automatically on the first boot.

# item Contents
1 command docker run
2 Run container in background To do(-d)
3 POSTGRES_USER (-e) odoo
4 POSTGRES_PASSWORD (-e) odoo
5 POSTGRES_DB (-e) postgres
6 The name of the container(--name) db
7 Docker image postgres:10

doccker.db.cmd


docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10

Command 2-Start odoo

Start the odo container by linking to the PostgreSQL container that was started earlier.

# item Contents
1 command docker run
3 Container port to be exposed to the host side(-p) 8069:8069
4 The name of the container(--name) odoo
5 Links to other containers(--link) db:db
6 Assign a pseudo terminal To do(-t)
7 Docker image odoo

docker.odoo.cmd


docker run -p 8069:8069 --name odoo --link db:db -t odoo

result

command prompt.cmd


Microsoft Windows [Version 10.0.18363.959]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\dev>docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10
Unable to find image 'postgres:10' locally
10: Pulling from library/postgres
75cb2ebf3b3c: Pull complete                                                                                             3ca6415d2bca: Pull complete                                                                                             ac08e6372a7b: Pull complete                                                                                             b4394fce95ce: Pull complete                                                                                             6edcd5da08e3: Pull complete                                                                                             3380dcb7db08: Pull complete                                                                                             c7c147d9c90d: Pull complete                                                                                             08ae47fef758: Pull complete                                                                                             3d807fd80688: Pull complete                                                                                             3f37a1ee389c: Pull complete                                                                                             cea1ff8f661e: Pull complete                                                                                             064c69d8ca75: Pull complete                                                                                             96c4055cb7f7: Pull complete                                                                                             4477915a4c1f: Pull complete                                                                                             Digest: sha256:e3a02efdce3ec64cfdb76a8ff93ae14d3294e47a0203d8230c8853a3890fe340
Status: Downloaded newer image for postgres:10
05ae7b08b1800ef560a3b6dca95c4071163b3d1582ffc224d87f2e77a29ab9a9

C:\Users\dev>docker run -p 8069:8069 --name odoo --link db:db -t odoo
Unable to find image 'odoo:latest' locally
latest: Pulling from library/odoo
bf5952930446: Already exists                                                                                            fa677b64d95a: Pull complete                                                                                             2dd4309767ba: Pull complete                                                                                             6ffbc48d26ec: Pull complete                                                                                             d6f4cbbe7cdf: Pull complete                                                                                             338ad56bea8c: Pull complete                                                                                             d6c8b0326958: Pull complete                                                                                             6fd5f5f6c87c: Pull complete                                                                                             24ccac123804: Pull complete                                                                                             Digest: sha256:a0a1f89921d66751b8f94042f4bd291d4761858ef4f4262a0b27de8cf70b74d6
Status: Downloaded newer image for odoo:latest
2020-08-11 03:43:19,685 1 INFO ? odoo: Odoo version 13.0-20200629
2020-08-11 03:43:19,685 1 INFO ? odoo: Using configuration file at /etc/odoo/odoo.conf
2020-08-11 03:43:19,686 1 INFO ? odoo: addons paths: ['/usr/lib/python3/dist-packages/odoo/addons', '/var/lib/odoo/addons/13.0', '/mnt/extra-addons']
2020-08-11 03:43:19,687 1 INFO ? odoo: database: [email protected]:5432
2020-08-11 03:43:19,935 1 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
2020-08-11 03:43:20,096 1 INFO ? odoo.service.server: HTTP service (werkzeug) running on 3dd0bcf7ca1d:8069

image.png

Login (first time)

Log in to odo at the following URL.

http://localhost:8069/

image.png

The following standard output is output to the command prompt as a pseudo terminal.

command prompt.cmd


2020-08-11 06:12:57,654 1 INFO ? odoo.http: HTTP Configuring static files
2020-08-11 06:12:57,685 1 INFO ? odoo.http: Generating nondb routing
2020-08-11 06:12:57,709 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:57] "GET / HTTP/1.1" 303 - 1 0.013 0.036
2020-08-11 06:12:57,732 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:57] "GET /web HTTP/1.1" 303 - 2 0.005 0.010
2020-08-11 06:12:57,853 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:57] "GET /web/database/selector HTTP/1.1" 200 - 2 0.004 0.098
2020-08-11 06:12:57,895 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:57] "GET /web/static/lib/fontawesome/css/font-awesome.css HTTP/1.1" 200 - - - -
2020-08-11 06:12:57,896 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:57] "GET /web/static/lib/bootstrap/css/bootstrap.css HTTP/1.1" 200 - - - -
2020-08-11 06:12:57,904 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:57] "GET /web/static/lib/jquery/jquery.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:57,964 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:57] "GET /web/static/lib/popper/popper.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:57,982 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:57] "GET /web/static/lib/bootstrap/js/index.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,005 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/lib/bootstrap/js/util.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,033 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/lib/bootstrap/js/alert.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,036 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/lib/bootstrap/js/button.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,053 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/lib/bootstrap/js/carousel.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,063 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/lib/bootstrap/js/collapse.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,091 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/lib/bootstrap/js/dropdown.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,094 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/lib/bootstrap/js/tooltip.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,095 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/lib/bootstrap/js/modal.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,112 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/lib/bootstrap/js/popover.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,127 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/lib/bootstrap/js/scrollspy.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,135 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/lib/bootstrap/js/tab.js HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,152 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/src/img/logo2.png HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,360 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/lib/fontawesome/fonts/fontawesome-webfont.woff2?v=4.7.0 HTTP/1.1" 200 - - - -
2020-08-11 06:12:58,399 1 INFO ? werkzeug: 172.17.0.1 - - [11/Aug/2020 06:12:58] "GET /web/static/src/img/favicon.ico HTTP/1.1" 200 - - - -

in conclusion

I installed Docker Desktop for Windows on Windows 10 and confirmed that the latest odo can be started with two commands.

odoo is also an open source ERP implemented in python, but you can use Odoo Studio for fast non-coding development.

Recommended Posts

Use Docker Desktop for Windows to start the latest odo with 2 commands
Start commands to make CentOS 7 unobtrusive in Parallels Desktop 16 for Mac
How to use Cmder with PyCharm (Windows)
Searching for properties to start with TensorFlow-Part 1
How to use MkDocs for the first time
Specify the Python executable to use with virtualenv
Use logger with Python for the time being
The easiest way to use OpenCV with python
Build a local development environment with WSL + Docker Desktop for Windows + docker-lambda + Python
Docker. Set frequently used commands to alias "with explanation"
How to share folders with Docker and Windows with tensorflow
Specify MinGW as the compiler to use with Python
Use python with docker
I want to use the Ubuntu desktop environment on Android for the time being (Termux version)
I want to use Ubuntu's desktop environment on Android for the time being (UserLAnd version)
How to deal with the error that Docker's MySQL container fails to start on Docker Toolbox
I want to use the latest gcc without sudo privileges! !!
[python] How to use the library Matplotlib for drawing graphs
For those who want to start machine learning with TensorFlow2
From environment construction to deployment for flask + Heroku with Docker
[Python] I want to use the -h option with argparse
How to implement Python EXE for Windows in Docker container
Until the start of the django tutorial with pycharm on Windows
I didn't know how to use the [python] for statement
Tips for Python beginners to use the Scikit-image example for themselves
pyenv, virtualenv Use docker to manage the environment without using
How to use the generator
Use Windows 10 fonts with WSL
How to use the decorator
How to start the program
Create an alias for Route53 to CloudFront with the AWS API
[September 2020 version] Explains the procedure to use Gmail API with Python
Switch the package to be installed for each environment with poetry
[Memo] How to use BeautifulSoup4 (2) Display the article headline with Requests
[Introduction to Python] How to use the in operator in a for statement?
How to use jupyter notebook without polluting your environment with Docker
The most polite way to use the Google Maps SDK for iOS
[Python] Explains how to use the format function with an example
How to use an external editor for Python development with Grasshopper
How to use machine learning for work? 01_ Understand the purpose of machine learning
The strongest way to use MeCab and CaboCha with Google Colab
For the time being, I want to convert files with ffmpeg !!
It's time to install DB with Docker! DB installation for beginners on Docker
[Memo] How to use BeautifulSoup4 (3) Display the article headline with class_
I compared while reading the documentation to use Jinja2 with Django
Solution to the problem that Ctrl + z cannot be used in Powershell in Docker for windows environment (provisional)
I want to use Ubuntu's desktop environment on Android for the time being (Termux version-Japanese input in desktop environment)