跳至主要內容
github构建docker镜像并推送

github构建docker镜像并推送

1.新建github仓库

新建github仓库

2.新建Dockerfile

FROM golang:alpine AS builder
RUN mkdir /app
ADD . /app/
WORKDIR /app
ENV GO111MODULE=off
RUN go build -o hello .
FROM alpine
RUN mkdir /app
WORKDIR /app
COPY --from=builder /app/hello .
CMD ["./hello"]

brinishness...大约 1 分钟Dockerdockerbuildgithub