docker 化
This commit is contained in:
19
.docker/db/Dockerfile
Normal file
19
.docker/db/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM mysql:5.7
|
||||
|
||||
#设置免密登录
|
||||
ENV MYSQL_ALLOW_EMPTY_PASSWORD yes
|
||||
|
||||
VOLUME ["/var/lib/mysql"]
|
||||
|
||||
RUN sed -i "s/^user.*/user = root/g" /etc/mysql/my.cnf
|
||||
|
||||
RUN chown -R mysql /var/lib/mysql
|
||||
RUN chgrp -R mysql /var/lib/mysql
|
||||
|
||||
#将所需文件放到容器中
|
||||
COPY .docker/db/setup.sh /var/lib/mysql/setup.sh
|
||||
COPY .docker/db/ppgo_job2.sql /var/lib/mysql/ppgo_job2.sql
|
||||
COPY .docker/db/privileges.sql /var/lib/mysql/privileges.sql
|
||||
|
||||
#设置容器启动时执行的命令
|
||||
CMD ["sh", "/var/lib/mysql/setup.sh"]
|
||||
324
.docker/db/ppgo_job2.sql
Normal file
324
.docker/db/ppgo_job2.sql
Normal file
File diff suppressed because one or more lines are too long
3
.docker/web/.env
Normal file
3
.docker/web/.env
Normal file
@@ -0,0 +1,3 @@
|
||||
CGO_ENABLED=0
|
||||
GOOS=darwin
|
||||
GOARCH=amd64
|
||||
13
.docker/web/Dockerfile
Normal file
13
.docker/web/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM alpine:3.8
|
||||
|
||||
# Expose the application on port 8080*
|
||||
EXPOSE 8080 443
|
||||
RUN apk add tzdata bash --update-cache --repository http://mirrors.ustc.edu.cn/alpine/v3.8/main/ --allow-untrusted
|
||||
RUN apk add --no-cache --virtual .build-deps curl tzdata --update-cache --repository http://mirrors.ustc.edu.cn/alpine/v3.8/main/ --allow-untrusted && \
|
||||
curl -o wait-for-it.sh https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && chmod +x wait-for-it.sh && \
|
||||
apk del .build-deps
|
||||
COPY conf/app.conf ./conf/
|
||||
COPY static ./static
|
||||
COPY views ./views
|
||||
ADD PPGo_Job .
|
||||
CMD ["./PPGo_Job"]
|
||||
Reference in New Issue
Block a user