2 Star 4 Fork 3

好未来技术团队/alarm-dog-fe

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.19 KB
一键复制 编辑 原始数据 按行查看 历史
ethananony 提交于 2020-10-28 22:08 +08:00 . init
FROM nginx:1.13.3-alpine as builder
RUN sed -i 's/^user.*$/user root;/' /etc/nginx/nginx.conf \
&& sed -i 's#/usr/share/nginx/html#/var/www#' /etc/nginx/conf.d/default.conf
FROM node:12.18.4-alpine3.9
LABEL maintainer="ethananony <[email protected]>" version="1.0"
COPY --from=builder /etc/nginx/conf.d/default.conf /tmp/default.conf
# update
RUN set -ex \
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk update \
&& apk add --no-cache git bash nginx \
# modify configure files
&& mv /tmp/default.conf /etc/nginx/conf.d/default.conf \
&& sed -i 's/^user.*$/user root;/' /etc/nginx/nginx.conf \
&& sed -i 's#/usr/share/nginx/html#/var/www#' /etc/nginx/conf.d/default.conf \
&& mkdir -p /var/www \
&& echo 'hello nginx!' > /var/www/index.html \
&& mkdir -p /run/nginx \
&& mkdir -p /var/log/nginx \
# show versions
&& node --version \
&& npm --version \
&& yarn --version \
&& nginx -v \
# ---------- clear works ----------
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man \
&& echo -e "\033[42;37m Build Completed :).\033[0m\n"
WORKDIR /var/www
ENTRYPOINT ["nginx", "-g", "daemon off;"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ta-tech-team/alarm-dog-fe.git
[email protected]:ta-tech-team/alarm-dog-fe.git
ta-tech-team
alarm-dog-fe
alarm-dog-fe
master

搜索帮助