Docker

October 25, 2022 |

 

Docker

===========



===========

1. Download images to local

$ docker pull <image_name:tag>

Docker hub: https://hub.docker.com/ 

2. Run a images
$ docker run -name <unique_container_name>  ...
$ docker run --help

3. List container

$ docker ps -a ///list all
$ docker ps //list container is running

4. Start/Stop Container

$ docker stop <container_id/container_name>
$ docker start <container_id/container_name>

5. Remove container/images

$ docker rm <container_id/container_name>
$ docker rmi <img_name>

6. Check container detail

$docker inspect <container_id/container_name>

7.  Install docker-compose

Ref: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-centos-7

//Check docker-compose version before install. In there docker-compose version is 1.23.2. 
// Check latest docker-compose here

$ sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

$ sudo chmod +x /usr/local/bin/docker-compose
$ docker-compose --version

Remove docker-compose
#by curl
$ sudo rm /usr/local/bin/docker-compose

#by yum, apt-get
$ sudo apt-get remove docker-compose
$ sudo yum remove docker-compose

#by pip
$ pip uninstall docker-compose
=======================
Create Volume
$ docker volume create <volume_name>





Problems:

1. Warning: Stop docker.service, but it can still be activated by : docker.socker

Solution:

1. systemctl stop docker.socket



is updating....







Read more…

[Wordpress] - WooCommerce Plugin

February 25, 2022 |

 

Ref:

1. https://woocommerce.com/document/woocommerce-rest-api/
2. https://woocommerce.github.io/woocommerce-rest-api-docs/wp-api-v2.html?php#list-all-products


Case study: There are a way used show Product in Mobile App. We can easy manage product without writing backend system.

Read more…