Lee-WineList/Dockerfile

22 lines
657 B
Docker
Raw Normal View History

2023-05-17 21:29:07 +08:00
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