FROM golang:1.17-alpine as builder
ENV GOPRIVATE=github.com/XXXXX/
ARG GITHUB_TOKEN=$GITHUB_TOKEN
RUN apk update && apk add git gcc g++ libc-dev librdkafka-dev pkgconf && mkdir /app && git config --global url."https://someusername:[email protected]".insteadOf "https://github.com"
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY ./ /app
RUN go build -tags dynamic
FROM alpine:3.1
RUN addgroup -S app && \
apk add --no-cache librdkafka-dev
RUN mkdir /logs && mkdir /app
WORKDIR /app
USER app
EXPOSE 8000 8001 8002
CMD ["./main"]
fatal: could not read Username for 'https://github.com': terminal prompts disabled Confirm the import path was entered correctly. If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.
Any idea how can I fix it inside docker