拉取alpine系统镜像
[root@localhost ~]# docker pull alpine
Using default tag: latest
latest: Pulling from library/alpine
Digest: sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300
Status: Image is up to date for alpine:latest
docker.io/library/alpine:latest
[root@localhost docker]# tree haproxy/
haproxy/
├── conf
│ └── RSS
├── Dockerfile
└── files
├── entrypoint.sh
├── haproxy-2.4.9.tar.gz
├── haproxy.cfg
├── install.sh
编写dockerfile
[root@localhost docker]# vim haproxy/Dockerfile
FROM alpine
LABEL MAINTAINER='neawalke 123456789@qq.com'
ENV version 2.4.9
ENV PATH /usr/local/harpoxy/sbin:$PATH
ADD files/haproxy-${version}.tar.gz /tmp/
ADD files/install.sh /tmp/
COPY files/entrypoint.sh /
RUN /tmp/install.s

本文介绍了如何从alpine系统镜像开始,编写Dockerfile来构建Haproxy镜像,并配置启动脚本和安装过程。涉及了环境变量设置、文件复制、软件安装和配置文件生成。
最低0.47元/天 解锁文章
1358

被折叠的 条评论
为什么被折叠?



