-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
33 lines (23 loc) · 1007 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM rockylinux:8.5.20220308
#定义启动jenkins的用户
USER root
#修改时区为东八区
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
echo 'Asia/Shanghai' >/etc/timezone
RUN sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.aliyun.com/rockylinux|g' \
-i.bak \
/etc/yum.repos.d/[Rr]ocky*.repo
RUN dnf makecache
# 安装epel-release
RUN yum install -y epel-release
# 安装必要工具
RUN yum install -y nginx && yum install -y python3.8 && yum install -y gcc && yum install -y python38-devel && yum install -y net-tools && yum install -y bind-utils && yum install -y lrzsz && yum install -y curl && yum install -y dos2unix
ADD nginx.conf /etc/nginx/nginx.conf
ADD server.crt /etc/pki/nginx/server.crt
ADD server.key /etc/pki/nginx/private/server.key
# 拷贝目录
COPY static /usr/share/nginx/static
COPY html /usr/share/nginx/html
# 启动nginx
CMD ["nginx", "-g", "daemon off;"]