docker day1

视频学习,地址:https://edu.51cto.com/center/course/lesson/index?id=71317

命令:

docker build -t csphere/centos:7.1 .

Sending build context to Docker daemon 8.704kB
Step 1/12 : FROM centos:centos7.1.1503
centos7.1.1503: Pulling from library/centos
c6fb3d2c9cb8: Pulling fs layer
error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/e1/e1430271e2f9143e48173bc8e2488b4194c01142ccb16b4f944052f65c6d9f0f/data?verify=1593757951-D%2Buq85hcD3ellyr2JSTS0xYS5M0%3D: Service Unavailable

查找原因是需要配置加速器
在这里插入图片描述

还是失败了。

然后准备配置阿里的服务器
1、注册阿里云
2、登陆后获取到url
果然可以用了,但还是要一步一步解决问题

docker build -t csphere/centos:7.1 .

No matching distribution found for supervisor
The command ‘/bin/sh -c pip install supervisor’ returned a non-zero code: 1

执行

/bin/sh -c pip install supervisor

然后再执行

docker build -t csphere/centos:7.1 .

成功。

docker images
docker build -t csphere/php-fpm:5.4 .
docker ps -a

docker run -d -p 8080:80 --name website csphere/php-fpm:5.4
这个启动后,不能够在页面访问到地址。
(发现是自己执行docker build -t csphere/php-fpm:5.4 . 的路径不对 )

docker ps -l
docker rm 5024c0839da7(CONTAINER ID )

启动
docker run -d -p 8080:80 --name website csphere/php-fpm:5.4

浏览器:http://localhost:8080/info.php
在这里插入图片描述
查看
docker exec -it website /bin/bash

supervisorctl

没有学完第一节课,没有时间了。😓

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值