Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Fix 'got a git repository' error when building Docker container #2049

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions genny/docker/templates/multi/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Buffalo complains if it is not run inside a git repo
RUN git init

ADD . .
RUN buffalo build --static -o /bin/app
Expand Down
2 changes: 2 additions & 0 deletions genny/docker/templates/standard/Dockerfile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Buffalo complains if it is not run inside a git repo
RUN git init

ADD . .
RUN buffalo build --static -o /bin/app
Expand Down