加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
William Guo 提交于 2018-11-19 11:06 . Initialization
# requiring Docker 17.05 or higher on the daemon and client
# see https://docs.docker.com/develop/develop-images/multistage-build/
# BUILD COMMAND :
# docker --build-arg RELEASE_VERSION=v1.0.0 -t infra/wayne:v1.0.0 .
# build ui
FROM 360cloud/wayne-ui-builder:v1.0.0 as frontend
ARG RAVEN_DSN
COPY src/frontend /workspace
RUN sed -i "s~__ravenDsn__~${RAVEN_DSN}~g" /workspace/src/environments/environment.prod.ts
RUN cd /workspace && \
npm config set registry https://registry.npm.taobao.org && \
npm install && \
npm run build
# build server
FROM 360cloud/wayne-server-builder:v1.0.0 as backend
COPY src/vendor /go/src/github.com/Qihoo360/wayne/src/vendor
COPY src/backend /go/src/github.com/Qihoo360/wayne/src/backend
RUN rm -rf /go/src/github.com/Qihoo360/wayne/src/backend/static
COPY --from=frontend /workspace/dist/ /go/src/github.com/Qihoo360/wayne/src/backend/static/
COPY --from=frontend /workspace/dist/index.html /go/src/github.com/Qihoo360/wayne/src/backend/views/
RUN cd /go/src/github.com/Qihoo360/wayne/src/backend && bee generate docs && bee pack -o /_build
# build release image
FROM centos:7
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
COPY --from=backend /_build/backend.tar.gz /opt/wayne/
WORKDIR /opt/wayne/
RUN tar -xzvf backend.tar.gz
CMD ["./backend"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化