支持docker

pull/3/head
tanghc 4 years ago
parent 02d3955d00
commit 418c9ffc7a
  1. 12
      dockerfile

@ -2,6 +2,18 @@ FROM java:8
VOLUME /tmp
VOLUME /sop
COPY sop.sql sop.sql
# 安装mysql
RUN yum install mysql mysql-server
RUN /etc/init.d/mysqld start &&\
mysql -e "grant all privileges on *.* to 'root'@'%' identified by 'root';" &&\
mysql -e "grant all privileges on *.* to 'root'@'localhost' identified by 'root';"
EXPOSE 3306
CMD ["mysqld_safe"]
CMD mysql -uroot -proot mysql < sop.sql
# 将所有应用放到一个镜像当中
ADD sop-gateway/target/*.jar sop/sop-gateway/sop-gateway.jar
ADD sop-admin/sop-admin-server/target/*.jar sop/sop-admin/sop-admin.jar

Loading…
Cancel
Save