本篇文章需要完成的以下几个操作:
[root@coco ~]# docker pull mysql:5.6
5.6: Pulling from library/mysql
35b2232c987e: Pull complete
fc55c00e48f2: Pull complete
0030405130e3: Pull complete
e1fef7f6a8d1: Pull complete
1c76272398bb: Pull complete
f57e698171b6: Pull complete
f5b825b269c0: Pull complete
dcb0af686073: Pull complete
27bbfeb886d1: Pull complete
6f70cc868145: Pull complete
1f6637f4600d: Pull complete
Digest: sha256:20575ecebe6216036d25dab5903808211f1e9ba63dc7825ac20cb975e34cfcae
Status: Downloaded newer image for mysql:5.6
docker.io/library/mysql:5.6
[root@coco ~]# docker pull owncloud
Using default tag: latest
latest: Pulling from library/owncloud
177e7ef0df69: Pull complete
9bf89f2eda24: Pull complete
350207dcf1b7: Pull complete
a8a33d96b4e7: Pull complete
c0421d5b63d6: Pull complete
f76e300fbe72: Pull complete
af9ff1b9ce5b: Pull complete
d9f072d61771: Pull complete
a6c512d0c2db: Pull complete
5a99458af5f8: Pull complete
8f2842d661a0: Pull complete
3c71c5361f06: Pull complete
baeacbad0a0c: Pull complete
e60049bf081a: Pull complete
0619078e32d3: Pull complete
a8e482ee2313: Pull complete
174d1b06857d: Pull complete
4a86c437f077: Pull complete
5e9ed4c3df2d: Pull complete
8a1479477c8e: Pull complete
8ab262044e9e: Pull complete
Digest: sha256:173811cb4c40505401595a45c39a802b89fb476885b3f6e8fe327aae08d20fe8
Status: Downloaded newer image for owncloud:latest
docker.io/library/owncloud:latest
1、在mysql5.6上创建
[root@coco ~]# docker run -itd --name XZZ --env MYSQL_ROOT_PASSWORD=redhat mysql:5.6
ae3c490c0b3dcc006041a9328f5df63ae03b55782d4f584099351cb3c19dc95d
2、在nowcloud上创建
[root@coco ~]# docker run -itd --name web1 --link XZZ:XZZ -p 80:80 owncloud:latest
c54ef0b594061d9f09d9f62f22b7d1138762e1e12220ddc77c9394c482d15f20
输入: http://192.268.11.133:80
到这儿第一步就完成了
需要的工具:
一个工具是docker-compose 另一个时harbor仓库
1、移动docker-compose
[root@coco ~]# mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose
mv:是否覆盖"/usr/local/bin/docker-compose"? y
[root@coco ~]#
[root@coco ~]#
[root@coco ~]#
[root@coco ~]#
2、查看是否文件是否存在
[root@coco ~]# ll /usr/local/bin
总用量 59056
-rw-r--r-- 1 root root 60470973 8月 24 15:21 docker-compose
[root@coco ~]#
[root@coco ~]#
[root@coco ~]#
3、给文件权限
[root@coco ~]# cd /usr/local/bin/
[root@coco bin]# chmod +x docker-compose
[root@coco bin]#
[root@coco bin]#
4、输出版本、出现版本号就表示安装成功
[root@coco bin]# docker-compose -v
Docker Compose version v2.20.2
1、查看harbor包
[root@coco ~]# ll | grep harbor
-rw-r--r-- 1 root root 612698835 8月 23 16:13 harbor-offline-installer-v2.4.1.tgz
[root@coco ~]#
[root@coco ~]#
2、解压harbor包
[root@coco ~]# tar xf harbor-offline-installer-v2.4.1.tgz -C /usr/local/
3、查看是否有以下目录
[root@coco ~]# cd /usr/local/
[root@coco local]# ls
bin etc games harbor include lib lib64 libexec sbin share src
[root@coco local]# cd harbor/
[root@coco harbor]# ls
common.sh harbor.v2.4.1.tar.gz harbor.yml.tmpl install.sh LICENSE prepare
4、复制文件 以便于修改
[root@coco harbor]# cp harbor.yml.tmpl harbor.yml
[root@coco harbor]#
进入 vim harbor.yml,找到
修改后为:
主机名可以自己设置,我这里将自己的主机名自己设置了,直接设置了以后,需要hostnamectl去重新设置一下,才能识别到。
[root@coco harbor]# hostnamectl set-hostname redhat.coco.com
[root@coco harbor]# hostname
redhat.coco.com
[Step 0]: checking if docker is installed ...
Note: docker version: 24.0.5
[Step 1]: checking docker-compose is installed ...
Note: docker-compose version: 2.20.2
[Step 2]: loading Harbor images ...
1e3f0dc884e2: Loading layer 39.45MB/39.45MB
3fd9ccd5eeaa: Loading layer 5.275MB/5.275MB
c600bceee2f7: Loading layer 4.096kB/4.096kB
724cd8711815: Loading layer 3.072kB/3.072kB
d7c82a981c89: Loading layer 17.32MB/17.32MB
a814341c2c44: Loading layer 18.12MB/18.12MB
Loaded image: goharbor/registry-photon:v2.4.1
b00595b6932d: Loading layer 5.27MB/5.27MB
e34892d856ce: Loading layer 5.928MB/5.928MB
ac5a22c6047d: Loading layer 14.47MB/14.47MB
3d1ac12eb215: Loading layer 29.29MB/29.29MB
394b4b2ea0fa: Loading layer 22.02kB/22.02kB
bb0deb7416e0: Loading layer 14.47MB/14.47MB
Loaded image: goharbor/notary-signer-photon:v2.4.1
c3b02aec560c: Loading layer 8.422MB/8.422MB
安装好以后会显示,
查看一下端口:
[root@coco harbor]#
[root@coco harbor]# ss -lntup | grep docker
tcp LISTEN 0 128 127.0.0.1:1514 *:* users:(("docker-proxy",pid=2287,fd=4))
tcp LISTEN 0 128 *:80 *:* users:(("docker-proxy",pid=2796,fd=4))
tcp LISTEN 0 128 [::]:80 [::]:* users:(("docker-proxy",pid=2800,fd=4))
2、查看harbor状态
[root@coco harbor]# docker-compose ls
NAME STATUS CONFIG FILES
harbor running(9) /usr/local/harbor/docker-compose.yml
如果密码没改,以下就是默认账户和密码
账户:admin
密码:Harbor12345
提示:这里对文章进行总结:
例如:以上就是今天要讲的内容,本文仅仅简单介绍了pandas的使用,而pandas提供了大量能使我们快速便捷地处理数据的函数和方法。