Docker is a full development platform for creating containerized apps, and Docker Desktop for Windows is the best way to get started with Docker on Windows.
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.
See Install Docker Desktop for Windows for information on system requirements and stable & edge channels.
Open a terminal window (Command Prompt or PowerShell, but not PowerShell ISE).
Open a terminal window (Command Prompt or PowerShell, but not PowerShell ISE).
- Run
docker --version
to ensure that you have a supported version of Docker:> docker --version Docker version 18.03.0-ce, build 0520e24
- Pull the hello-world image from Docker Hub and run a container:
> docker run hello-world docker : Unable to find image 'hello-world:latest' locally ... latest: Pulling from library/hello-world ca4f61b1923c: Pulling fs layer ca4f61b1923c: Download complete ca4f61b1923c: Pull complete Digest: sha256:97ce6fa4b6cdc0790cda65fe7290b74cfebd9fa0c9b8c38e979330d547d22ce1 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. ...
- List the
hello-world
image that was downloaded from Docker Hub:> docker image ls
- List the
hello-world
container (that exited after displaying “Hello from Docker!”):> docker container ls --all
- Explore the Docker help pages by running some help commands:
> docker --help > docker container --help > docker container ls --help > docker run --help
Configuring Odoo
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 runcommand 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.
docker start odoo // start the odoo
docker stop odoo // stop odoo container
Now you can check the Odoo running on:8069
Also, here is some useful command when we are using docker
For Buid New image:
For Buid New image:
> docker build -t "New Image Name" "path of docker file"
For Execute command and Connect to image:
> docker exec -it "image name" bash //Enter in the image or> docker exec -it "image name" pip3 install xlrd // Install Package
Informative blog..
ReplyDeleteDevOps Online Training
This is a very helpful article for me, Thanks for sharing this useful article and keep continue to post a similar article in future
ReplyDeleteOdoo ERP Implementation
ReplyDeleteVery Informative Blog if you want to know more about devops kindly visit DevOps Training in Bangalore | Certification | Online Training Course institute | DevOps Training in Hyderabad | Certification | Online Training Course institute | DevOps Training in Coimbatore | Certification | Online Training Course institute | DevOps Online Training | Certification | Devops Training Online