加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 570 Bytes
一键复制 编辑 原始数据 按行查看 历史
YuleiLan 提交于 2021-04-25 15:18 . fix: update Dockerfile
FROM golang:1.15 AS build
WORKDIR /opt/ferry
COPY . .
ARG GOPROXY="https://goproxy.cn"
RUN go mod download
RUN go build -o ferry .
FROM debian:buster AS prod
WORKDIR /opt/ferry
COPY --from=build /opt/ferry/ferry /opt/ferry/
COPY config/ /opt/ferry/default_config/
COPY template/ /opt/ferry/template/
COPY docker/entrypoint.sh /opt/ferry/
RUN mkdir -p logs static/uploadfile static/scripts static/template
RUN chmod 755 /opt/ferry/entrypoint.sh
RUN chmod 755 /opt/ferry/ferry
EXPOSE 8002
VOLUME [ "/opt/ferry/config" ]
ENTRYPOINT [ "/opt/ferry/entrypoint.sh" ]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化