Merge branch 'jobatzil/fix/docker' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness (#32)

This commit is contained in:
Johannes Batzill 2023-04-19 17:41:30 +00:00 committed by Harness
commit a33bbc0fbe

View File

@ -2,11 +2,16 @@
FROM golang:1.19-alpine as builder FROM golang:1.19-alpine as builder
RUN apk update \ RUN apk update \
&& apk add --no-cache protoc build-base && apk add --no-cache protoc build-base git
# Setup workig dir # Setup workig dir
WORKDIR /app WORKDIR /app
# Access to private repos
ARG GITHUB_ACCESS_TOKEN
RUN git config --global url."https://${GITHUB_ACCESS_TOKEN}:x-oauth-basic@github.com/harness".insteadOf "https://github.com/harness"
RUN go env -w GOPRIVATE=github.com/harness/*
# Get dependancies - will also be cached if we won't change mod/sum # Get dependancies - will also be cached if we won't change mod/sum
COPY go.mod . COPY go.mod .
COPY go.sum . COPY go.sum .