lazytong commited on
Commit
12816f3
·
1 Parent(s): 88ff70d
Files changed (1) hide show
  1. Dockerfile +7 -9
Dockerfile CHANGED
@@ -1,11 +1,9 @@
1
- FROM centos/systemd
2
  RUN yum update -y && yum install -y wget tar default-jre
3
  RUN wget -qO- https://raw.githubusercontent.com/mcsmanager/Script/master/setup.sh | bash
4
- RUN echo '#!/bin/bash' > /entrypoint.sh \
5
- && echo '/usr/sbin/init &' >> /entrypoint.sh \
6
- && echo 'sleep 3' >> /entrypoint.sh \
7
- && echo 'systemctl start mcsm-web mcsm-daemon' >> /entrypoint.sh \
8
- && echo 'sed -i "s/port: 23333/port: 7860/" /opt/mcsmanager/web/config.yml' >> /entrypoint.sh \
9
- && echo 'exec /usr/sbin/init' >> /entrypoint.sh \
10
- && chmod +x /entrypoint.sh
11
- CMD ["/entrypoint.sh"]
 
1
+ FROM centos
2
  RUN yum update -y && yum install -y wget tar default-jre
3
  RUN wget -qO- https://raw.githubusercontent.com/mcsmanager/Script/master/setup.sh | bash
4
+ RUN cp /opt/mcsmanager/web/config.yml /opt/mcsmanager/web/config_backup.yml && \
5
+ sed -i 's/port: 23333/port: 7860/' /opt/mcsmanager/web/config.yml
6
+ RUN yum install -y epel-release
7
+ RUN yum install -y python3 python3-pip
8
+ RUN pip3 install docker-systemctl-replacement
9
+ CMD ["/usr/bin/python3", "/usr/local/bin/docker-systemctl-replacement.py", "bash", "-c", "/usr/sbin/init && systemctl start mcsm-web mcsm-daemon"]