-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile_cpanel
41 lines (32 loc) · 1.47 KB
/
Dockerfile_cpanel
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
33
34
35
36
37
38
39
40
41
FROM centos:7
MAINTAINER sinesio <[email protected]>
ENV container docker
RUN yum -y swap -- remove fakesystemd -- install systemd systemd-libs
RUN yum -y update; yum clean all; \
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /etc/systemd/system/*.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/basic.target.wants/*;\
rm -f /lib/systemd/system/anaconda.target.wants/*;
RUN yum -y swap -- remove systemd-container systemd-container-libs -- install systemd systemd-libs
RUN yum -y update
RUN yum -y install wget
RUN yum -y install openssh-server
RUN yum -y install vim
RUN rm -f /etc/sysconfig/iptables
RUN touch /etc/fstab
RUN chmod 0640 /etc/fstab
RUN wget -O /usr/local/src/latest.sh http://httpupdate.cpanel.net/latest
RUN chmod +x /usr/local/src/latest.sh
RUN /usr/local/src/latest.sh --target /usr/local/src/cpanel/ --noexec
RUN sed -i 's/check_hostname();/# check_hostname();/g' /usr/local/src/cpanel/install
RUN cd /usr/local/src/cpanel/ && ./bootstrap --force
COPY start.sh /root/start.sh
RUN chmod +x /root/start.sh
VOLUME [ "/sys/fs/cgroup" ]
CMD ["/usr/sbin/init"]
EXPOSE 20 21 22 25 53 80 110 143 443 465 587 993 995 2077 2078 2082 2083 2086 2087 2095 3306
ENTRYPOINT /root/start.sh