Commit 8aa058d9 authored by 谢旭东's avatar 谢旭东

Merge branch 'go' into 'master'

buildah and golang

See merge request !31
parents 78168268 9905896f
Pipeline #45617 skipped with stages
......@@ -13,12 +13,12 @@ ARGS += --build-arg GRPC_HEALTH_PROBE_VERSION=$(GRPC_HEALTH_PROBE_VERSION)
endif
$(BUILDERS): %: builders/%
DOCKER_BUILDKIT=1 docker build $(ARGS) -t ${DOCKER_REG}/$@ $< --network=host
buildah bud $(ARGS) -t ${DOCKER_REG}/$@ $<
$(PUSH_BUILDERS): push-%: %
docker push $(DOCKER_REG)/$<
docker tag $(DOCKER_REG)/$< $(DOCKER_REG)/$<:$(VERSION)
docker push $(DOCKER_REG)/$<:$(VERSION)
buildah push $(DOCKER_REG)/$<
buildah tag $(DOCKER_REG)/$< $(DOCKER_REG)/$<:$(VERSION)
buildah push $(DOCKER_REG)/$<:$(VERSION)
builders: $(BUILDERS)
......
FROM quay.io/buildah/stable:v1.23.0
LABEL MAINTAINER="atom@supremind.com"
RUN curl -o /etc/yum.repos.d/fedora.repo http://mirrors.aliyun.com/repo/fedora.repo && \
curl -o /etc/yum.repos.d/fedora-updates.repo http://mirrors.aliyun.com/repo/fedora-updates.repo && \
sudo yum makecache
RUN yum -y install make git openssh && rm -rf /var/cache && yum -y clean all
# syntax=docker/dockerfile:1.2
FROM golang:1.15-alpine3.13 AS builder
ENV GOPROXY=https://goproxy.io,direct
ENV GOPRIVATE=git.supremind.info
ENV GO111MODULE=on
ENV GOSUMDB=off
RUN go get github.com/onsi/ginkgo/ginkgo@v1.16.4
# for accurate cross-package test coverage report
# see: https://www.ory.sh/golang-go-code-coverage-accurate/
RUN go get github.com/ory/go-acc@v0.2.6
FROM golang:1.15-alpine3.13
FROM docker.io/library/golang:1.17-alpine
LABEL MAINTAINER="atom@supremind.com"
ENV GOPROXY=https://goproxy.io,direct
ARG GOPROXY=https://goproxy.io,direct
ENV GOPRIVATE=git.supremind.info
ENV GO111MODULE=on
ENV GOSUMDB=off
ARG CGO_ENABLED=0
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add --no-cache git build-base ca-certificates bash curl openssh-client
COPY --from=builder /go/bin/ginkgo /usr/local/bin/ginkgo
COPY --from=builder /go/bin/go-acc /usr/local/bin/go-acc
RUN go install github.com/onsi/ginkgo/ginkgo@v1.16.4
# for accurate cross-package test coverage report
# see: https://www.ory.sh/golang-go-code-coverage-accurate/
RUN go install github.com/ory/go-acc@v0.2.6
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment