Skip to content

Instantly share code, notes, and snippets.

@alanhg
Created August 6, 2023 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanhg/18f8932704cc9c9288d56d6fff5c2aad to your computer and use it in GitHub Desktop.
Save alanhg/18f8932704cc9c9288d56d6fff5c2aad to your computer and use it in GitHub Desktop.
centos-lrzsz.dockerfile
1 # 维护者信息
2 # 使用官方 CentOS 镜像为基础
3 FROM centos:centos7
4
5
6 # 安装 nginx 和 lrzsz
7 RUN yum -y update && \
8 yum -y install epel-release && \
9 yum -y install nginx lrzsz && \
10 yum clean all
11
12 # 暴露 80 端口
13 EXPOSE 80
14
15 # 当容器启动时,运行 nginx 以保持前台运行
16 CMD ["nginx", "-g", "daemon off;"]
17
18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment