一个可行的docker部署方案
This commit is contained in:
19
docker/nginx/Dockerfile
Normal file
19
docker/nginx/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
RUN apk add --no-cache bash
|
||||
|
||||
ARG TZ=Asia/Shanghai
|
||||
RUN \
|
||||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
|
||||
apk update && \
|
||||
apk add tzdata
|
||||
RUN ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \
|
||||
echo '${TZ}' > /etc/timezone
|
||||
|
||||
RUN rm -rf /etc/nginx/conf.d/*
|
||||
RUN mkdir /opt/dist
|
||||
COPY ./dist /opt/dist
|
||||
COPY ./conf/nginx.conf /etc/nginx/conf.d
|
||||
|
||||
CMD ["nginx","-g","daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user