Alpine-Nginx
FROM alpine:3.11
RUN apk update \
&& apk add --no-cache nginx tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata \
&& mkdir /run/nginx/ \
&& rm -rf /var/cache/apk/*
EXPOSE 80 443
#ENTRYPOINT ["/run.sh"]
CMD ["nginx", "-g", "daemon off;"]
[root@kp ~]# docker build -t mmp:v1 .
Sending build context to Docker daemon 529.9kB
Step 1/4 : FROM alpine:3.11
---> d2bcc698e2fc
Step 2/4 : RUN apk update && apk add --no-cache nginx tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && apk del tzdata && mkdir /run/nginx/ && rm -rf /var/cache/apk/*
---> Using cache
---> d7fa977b40ea
Step 3/4 : EXPOSE 80 443
---> Using cache
---> 1b5140208a9b
Step 4/4 : CMD ["nginx", "-g", "daemon off;"]
---> Using cache
---> 7c36301aee5b
Successfully built 7c36301aee5b
Successfully tagged mmp:v1
[root@kp ~]# docker run -d --name mmp mmp:v1
Last updated