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.
22 lines
531 B
22 lines
531 B
6 months ago
|
FROM 192.168.1.131:8888/library/golang:1.20.5 AS builder
|
||
|
|
||
|
COPY . /src
|
||
|
WORKDIR /src
|
||
|
|
||
|
RUN go mod tidy
|
||
|
RUN go build hot.go
|
||
|
|
||
|
FROM 192.168.1.131:8888/library/alpine:3.13
|
||
|
RUN apk add make
|
||
|
RUN set -eux && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
|
||
|
RUN apk update && apk add tzdata
|
||
|
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||
|
RUN echo "Asia/Shanghai" > /etc/timezone
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY --from=builder /src/configs /app/configs
|
||
|
COPY --from=builder /src/hot /app/hot
|
||
|
ENTRYPOINT ["./hot"]
|
||
|
|