站点更新:2018-07-06 15:11:14

This commit is contained in:
ehlxr 2018-07-06 15:11:14 +08:00
parent 570c261d3c
commit 63d2a1d728
2 changed files with 13 additions and 3 deletions

View File

@ -1,11 +1,15 @@
FROM alpine:latest FROM alpine:latest
LABEL maintainer="ehlxr.me@gmail.com" LABEL maintainer="ehlxr.me@gmail.com"
ENV TZ "Asia/Shanghai"
WORKDIR /app WORKDIR /app
VOLUME /data VOLUME /data
RUN apk add --update --no-cache mysql mysql-client \ RUN apk add --update --no-cache mysql mysql-client tzdata \
&& rm -f /var/cache/apk/* && ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone \
&& rm -rf /var/cache/apk/*
COPY my.cnf /etc/mysql/my.cnf COPY my.cnf /etc/mysql/my.cnf
COPY startup.sh /startup.sh COPY startup.sh /startup.sh

View File

@ -9,6 +9,12 @@ RUN hexo generate && gulp
FROM nginx:alpine FROM nginx:alpine
LABEL maintainer="ehlxr.me@gmail.com" LABEL maintainer="ehlxr.me@gmail.com"
ENV TZ "Asia/Shanghai"
WORKDIR /usr/share/nginx/html WORKDIR /usr/share/nginx/html
COPY --from=0 /hexo/public . COPY --from=0 /hexo/public .
RUN apk upgrade --update \
&& apk add tzdata \
&& ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone \
&& rm -rf /var/cache/apk/*
ENTRYPOINT ["nginx", "-g", "daemon off;"] ENTRYPOINT ["nginx", "-g", "daemon off;"]