FROM registry.cn-hangzhou.aliyuncs.com/hyxc/golang:alpine-1.18 as builder WORKDIR /builder COPY . . VOLUME /tmp/drone_cache VOLUME /cache RUN go mod tidy && go mod download && go build -o wineApp . RUN ls -lh && chmod +x ./wineApp FROM alpine:3.13.4 as runner RUN echo "http://mirrors.aliyun.com/alpine/v3.13/main/" > /etc/apk/repositories RUN echo "http://mirrors.aliyun.com/alpine/v3.13/community/" >> /etc/apk/repositories RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ && echo "Asia/Shanghai" > /etc/timezone \ && apk del tzdata COPY --from=builder /builder/wineApp . ADD config.yaml /config.yaml CMD ./wineApp