宜蘭縣教育支援平台 會員登入 會員註冊 我的i教書

1. 搜尋
[root@docker ~]# docker search b2d
INDEX       NAME                                       DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
docker.io   docker.io/matthewlmcclure/javahelloworld   See https://github.com/matthewlmcclure/to-...   0                    [OK]
docker.io   docker.io/ols3/ob2d                        For OB2D Linux container.                       0
docker.io   docker.io/smothiki/qemu-b2d                                                                0
docker.io   docker.io/smothiki/ubuntu-b2d                                                              0

2. 下載
[root@docker ~]# docker pull docker.io/ols3/ob2d
Using default tag: latest
Trying to pull repository docker.io/ols3/ob2d ...
latest: Pulling from docker.io/ols3/ob2d

0cb4bcf975cb: Pull complete
14cb4b14bf3d: Pull complete
467076336f48: Pull complete
38b2f86c4e61: Pull complete
Digest: sha256:89c5fbe1533f43f5bf5abc0a26f5fefb898bd5c0525d2c5ccf8df44da668f1db

 (閱讀全文)

在刪除 image 時有時候會無法刪除
# docker rmi docker.io/egypcio/freebsd
Error response from daemon: conflict: unable to remove repository reference "docker.io/egypcio/freebsd" (must force) - container 498289b4fbba is using its referenced image 8f539b0870b1

主要的原因是有 container 使用到這一個 image

 (閱讀全文)

1. 安裝 docker
# yum install docker

2. 開機啟動及啟動 docker 服務
# systemctl enable docker.service
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
# systemctl start docker.service

3. 查看 docker 版本資訊
# docker -v
Docker version 1.12.6, build 96d83a5/1.12.6

# docker version
Client:
 Version:         1.12.6
 API version:     1.24
 Package version: docker-common-1.12.6-11.el7.centos.x86_64
 Go version:      go1.7.4
 Git commit:      96d83a5/1.12.6
 Built:           Tue Mar  7 09:23:34 2017
 OS/Arch:         linux/amd64

Server:
 Version:         1.12.6
 API version:     1.24
 Package version: docker-common-1.12.6-11.el7.centos.x86_64
 Go version:      go1.7.4
 Git commit:      96d83a5/1.12.6
 Built:           Tue Mar  7 09:23:34 2017
 OS/Arch:         linux/amd64

 (閱讀全文)

參考網站:
用ESXi建Photon OS虛擬機 打造超輕量Docker環境 - 專題報導 - 網管人NetAdmin
Basic Commands for VMware Photon and Docker | Virten.net

1. 執行內建的 Nginx 網站
連上網路下載
-d 以 Daemonized 形式執行
# docker run -d -p 80:80 vmwarecna/nginx
Unable to find image 'vmwarecna/nginx:latest' locally
latest: Pulling from vmwarecna/nginx
a3ed95caeb02: Pull complete
b6f2388a20dd: Pull complete
a305e4b888ce: Pull complete
80596a504ef3: Pull complete
99c028eff2a4: Pull complete
a1cee46bc434: Pull complete
9bd9868012b9: Pull complete
6fa7100a2613: Pull complete
Digest: sha256:f73bbae0f31823c06478b1fa5efb4957bc25239802fd5ea94e4442c0a6090d23
Status: Downloaded newer image for vmwarecna/nginx:latest
085923c591c6b63b477d3267e4f42945a02ea8ebf828e030740b4c299f0e6d57

 (閱讀全文)