2021 技能大赛云计算赛项先电 2,java 基础入门课后答案清华大学出版社
===================================================================
https://www.bilibili.com/video/BV1j64y1i7Ry
=================================================================
=====================================================================
=========================================================================
[root@master java]# cat Dockerfile
FROM 192.168.200.4/library/centos:centos7.5.1804
MAINTAINER Chinaskill
RUN rm -rvf /etc/yum.repos.d/*
ADD ftp.repo /etc/yum.repos.d/
ADD jdk-8u77-linux-x64.tar.gz /opt
..........
..........
ADD start.sh /start.sh
RUN chmod +x /start.sh
EXPOSE 8081
EXPOSE 8082
EXPOSE 20880
EXPOSE 20881
EXPOSE 9090
CMD ["bash","/start.sh"]
========================================================================
[root@master mysql]# ll
total 72
-rw-r--r-- 1 root root 381 Apr 7 11:21 Dockerfile
-rw-r--r-- 1 root root 169 Apr 7 11:20 ftp.repo
-rw-r--r-- 1 root root 59239 Dec 30 12:09 gpmall.sql
-rw-r--r-- 1 root root 341 Apr 7 17:12 init.sh
[root@master mysql]# cat Dockerfile
FROM 192.168.200.4/library/centos:centos7.5.1804
MAINTAINER Chinaskill
RUN rm -rvf /etc/yum.repos.d/*
ADD ftp.repo /etc/yum.repos.d/
ADD gpmall.sql /root/
RUN yum install -y mariadb-server
RUN sed -i "13cport = 8066" /etc/my.cnf.d/server.cnf
ADD init.sh /root/init.sh
RUN chmod +x /root/init.sh
RUN /root/init.sh
ENV LC_ALL en_US.UTF-8
EXPOSE 3306
EXPOSE 8066
CMD ["mysqld_safe"]
[root@master mysql]# cat ftp.repo
[k8s]
name=k8s
baseurl=ftp://192.168.200.4/ChinaskillMall/gpmall-repo
gpgcheck=0
enabled=1
[centos]
name=centos
baseurl=ftp://192.168.100.10/centos
gpgcheck=0
enabled=1
[](
https://blog.csdn.net/qq_45714272/article/details/115444957)四、Redis 环境
========================================================================
[root@master redis]# ls
Dockerfile ftp.repo
[root@master redis]# cat Dockerfile
FROM 192.168.200.4/library/centos:centos7.5.1804
MAINTAINER Chinaskill
RUN rm -rvf /etc/yum.repos.d/*
COPY ftp.repo /etc/yum.repos.d/local.repo
RUN yum clean all
RUN yum list
RUN yum -y install redis
RUN sed -i -e 's@bind 127.0.0.1@bind 0.0.0.0@g' /etc/redis.conf
RUN sed -i -e 's@protected-mode yes@protected-mode no@g' /etc/redis.conf
RUN sed -i -e 's@daemonize yes@daemonize no@g' /etc/redis.conf
EXPOSE 6379
ENTRYPOINT redis-server /etc/redis.conf
CMD ["redis-server"]
============================================================================
[root@master zookeeper]# ls
Dockerfile ftp.repo zookeeper-3.4.14.tar.gz
[root@master zookeeper]# cat Dockerfile
FROM 192.168.200.4/library/centos:centos7.5.1804
MAINTAINER Chinaskill
RUN rm -rvf /etc/yum.repos.d/*
评论