ARO-RP/Dockerfile.ci-tunnel

27 строки
581 B
Docker
Исходник Постоянная ссылка Обычный вид История

2024-07-10 21:58:46 +03:00
ARG REGISTRY
ARG ARO_VERSION
FROM ${REGISTRY}/ubi8/go-toolset:1.21.13-1 AS builder
2024-07-10 21:58:46 +03:00
ARG ARO_VERSION
USER root
WORKDIR /app
# golang config and build steps
ENV GOPATH=/root/go
# Copy dependencies and source files
COPY go.mod go.sum ./
COPY vendor vendor
COPY hack hack
COPY pkg pkg
# build
RUN go build -ldflags "-X github.com/Azure/ARO-RP/pkg/util/version.GitCommit=${ARO_VERSION}" ./hack/tunnel
FROM ${REGISTRY}/ubi8/ubi-minimal AS final
RUN microdnf update && microdnf clean all
COPY --from=builder /app/tunnel /usr/local/bin/
ENTRYPOINT ["tunnel"]
EXPOSE 8443/tcp
USER 1000