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

False error 'not a git repository' on docker build when app is in subdir or .git is in .dockerignore #2048

Closed
mkungla opened this issue Sep 9, 2020 · 3 comments · Fixed by #2053
Assignees
Milestone

Comments

@mkungla
Copy link

mkungla commented Sep 9, 2020

Description

RUN buffalo build --static -o /bin/app
fatal: not a git repository (or any of the parent directories): .git

but build succeeds.

Steps to Reproduce the Problem

Please describe in painful detail what you did (so others can play along with you) to get to this point. This includes things like the exact command(s) you used, or the curl command you used, that sort of thing.

  1. app in subdir and use COPY ./app /app

Expected Behavior

no errors

Actual Behavior

fatal: not a git repository (or any of the parent directories): .git

Info

Please run buffalo info and paste the information below where it says "PASTE_HERE".

Buffalo version is: v0.16.14 
@leoromanovsky
Copy link

Related to: #2028

I fixed the issue locally by inserting:

RUN git init

Into my Dockerfile; will submit a PR.

@ghost
Copy link

ghost commented Oct 3, 2020

Hi

@paganotoni paganotoni linked a pull request Oct 7, 2020 that will close this issue
@paganotoni
Copy link
Member

This one is solved by v0.16.16

@paganotoni paganotoni self-assigned this Oct 22, 2020
@paganotoni paganotoni added this to the v0.16.16 milestone Oct 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants