# run the command in the folder which contains Dockerfile
# user@computer odoo_test % ls -la # total 8 # drwxr-xr-x@ 3 user staff 96 Mar 6 09:42 . # drwx------@ 20 user staff 640 Mar 7 01:42 .. # -rw-r--r--@ 1 user staff 1546 Mar 6 09:42 Dockerfile
docker build -t salarymaster/odoo:odoo_12 .
Download docker image
1 2
# download from Docker Hub docker pull salarymaster/odoo:H_12.0
Upload docker image
1 2 3 4 5 6
# upload to Docker Hub docker push salarymaster/odoo:odoo_12
# "salarymaster" is the name of organization/user # "odoo" is the repository name created by "salarymaster" # "odoo_12" is the tag in "odoo" repository to distinguish different version of docker images
List docker image
1
docker image ls
Run docker image / Create image instance (container)
1 2
# this command will maintain the container even exiting docker run -itu root salarymaster/odoo:basic /bin/bash
Tag docker image
1 2
# ImageID comes from "docker image ls" command docker tag ImageID salarymaster/odoo:new_tagname
Remove docker image
1 2 3 4 5
# if ImageID is unique, use ImageID to remove docker image rm ImageID
# if ImageID is not unique, use unique combination tag to remove docker image rm OrgName/RepName:TagName