21 lines
414 B
Docker
21 lines
414 B
Docker
FROM golang:alpine AS build
|
|
|
|
WORKDIR /go/src/github.com/yumc.pw/cloud
|
|
ADD main.go .
|
|
RUN go build
|
|
|
|
FROM alpine:edge
|
|
LABEL maintainer="MiaoWoo<admin@yumc.pw>"
|
|
|
|
ENV LANG C.UTF-8
|
|
WORKDIR /root
|
|
RUN apk add --no-cache ca-certificates
|
|
|
|
COPY --from=build /go/src/github.com/yumc.pw/cloud/cloud ./main
|
|
|
|
ENV SOURCE=yumc.pw
|
|
ENV TARGET=https://git.yumc.pw
|
|
ENV PROTOCOL=git
|
|
|
|
CMD ./main -s ${SOURCE} -t ${TARGET} -p ${PROTOCOL}
|