标签:rpm安装 sdn dock dev docke existing -bash 市场 cmd
非正常应用方式启动的镜像制作,其实就是制作一些不是默认使用rpm安装的程序镜像下面将以两种镜像制作例子展示:
build.sh
#!/bin/bash
docker build -t docker.anyonedev.com/public/httpd:2.4.6 .
docker push docker.anyonedev.com/public/httpd:2.4.6
httpd-foreground
#!/bin/sh
set -e
# Apache gets grumpy about PID files pre-existing
rm -f /usr/local/apache2/logs/httpd.pid
exec httpd -DFOREGROUND
Dockerfile
FROM docker.anyonedev.com/public/centos:7.4.1708
ENV TZ "Asia/Shanghai"
RUN yum install -y httpd-2.4.6-89.el7.centos
EXPOSE 80
COPY httpd-foreground /usr/local/bin/
CMD ["httpd-foreground"]
标签:rpm安装 sdn dock dev docke existing -bash 市场 cmd
原文地址:https://blog.51cto.com/xiaoqiangjs/2444452