You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
image/Dockerfile

14 lines
476 B

# 编译
FROM gographics/imagick.v3:im-7.0.9-12
COPY . /build/
WORKDIR /build
RUN GOPROXY=https://goproxy.cn GOSUMDB=off GO111MODULE=on CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags '-w -s' -o server
# 运行阶段
FROM dpokidov/imagemagick:7.0.10-28-stretch
# 从编译阶段的中拷贝编译结果到当前镜像中
COPY --from=0 /build/server /
# 拷贝配置文件
COPY --from=0 /build/config/app.ini /data/config/app.ini
WORKDIR /data
ENTRYPOINT ["/server"]