added Dockerfiles

This commit is contained in:
Marvin Zhang
2019-08-16 00:09:04 +08:00
parent a1c45cb5de
commit 7aa6afb4b5
5 changed files with 54 additions and 14 deletions

View File

@@ -0,0 +1,20 @@
FROM alpine:latest
# 安装nginx
RUN mkdir /run/nginx && apk add nginx
# 拷贝编译文件
COPY dist /app/dist
# 拷贝nginx代理文件
COPY crawlab.conf /etc/nginx/conf.d
# 拷贝执行脚本
COPY docker_init.sh /app/docker_init.sh
# 定义后端API脚本
ENV CRAWLAB_API_ADDRESS http://localhost:8000
EXPOSE 8080
CMD ["/bin/sh", "/app/docker_init.sh"]