基于容器制作apache镜像
一、源码安装httpd
//拉取centos镜像
[root@localhost ~]
Using default tag: latest
latest: Pulling from library/centos
a1d0c7532777: Pull complete
Digest: sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177
Status: Downloaded newer image for centos:latest
docker.io/library/centos:latest
[root@localhost ~]
REPOSITORY TAG IMAGE ID CREATED SIZE
centos latest 5d0da3dc9764 10 months ago 231MB
//创建容器
[root@localhost ~]
405a18c104c2a055a0e74d371a4e48148188a7ec43cc1de3c95d37b6083500a4
[root@localhost ~]
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
405a18c104c2 5d0da3dc9764 "/bin/bash" 9 minutes ago Up 9 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp httpd
//下载httpd所需要的源码包
[root@localhost ~]
[root@localhost data]
--2022-08-09 08:50:01-- https://mirrors.aliyun.com/apache/apr/apr-1.6.5.tar.gz
Resolving mirrors.aliyun.com (mirrors.aliyun.com)... 43.224.184.229, 43.224.184.226, 45.253.17.214, ...
Connecting to mirrors.aliyun.com (mirrors.aliyun.com)|43.224.184.229|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1073556 (1.0M) [application/octet-stream]
Saving to: ‘apr-1.6.5.tar.gz’
apr-1.6.5.tar.gz 100%[=========================>] 1.02M 148KB/s in 7.1s
2022-08-09 08:50:08 (148 KB/s) - ‘apr-1.6.5.tar.gz’ saved [1073556/1073556]
[root@localh