Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile --local can only be used inside a git repository #1347

Closed
kmshar opened this issue Aug 22, 2024 · 1 comment
Closed

Dockerfile --local can only be used inside a git repository #1347

kmshar opened this issue Aug 22, 2024 · 1 comment
Labels
stale stalebot believes this issue/PR is no longer active

Comments

@kmshar
Copy link

kmshar commented Aug 22, 2024

Dockerfile --local can only be used inside a git repository

Description:

Fails to build with default configuration.

To Reproduce:

Build docker using docker build -t lyft/cartography .

Logs:

=> ERROR [10/10] RUN /usr/bin/git config --local user.name "cartography"                                                                                                         0.2s
------
 > [10/10] RUN /usr/bin/git config --local user.name "cartography":
0.203 fatal: --local can only be used inside a git repository
------
Dockerfile:33
--------------------
  31 |     # and the user that is going to run the unit&integ tests.
  32 |     RUN git config --global --add safe.directory /srv/cartography
  33 | >>> RUN /usr/bin/git config --local user.name "cartography"
  34 |
--------------------
ERROR: failed to solve: process "/bin/sh -c /usr/bin/git config --local user.name \"cartography\"" did not complete successfully: exit code: 128

Screenshots:

cartography-docker-failed-build

@chandanchowdhury
Copy link
Collaborator

Looks like there is not a Git repo where you are running the command.

Did you use git clone or some other method?

Try git init and then build again using dist.Dockerfile to see if that helps.

@chandanchowdhury chandanchowdhury added the stale stalebot believes this issue/PR is no longer active label Sep 11, 2024
chandanchowdhury pushed a commit that referenced this issue Oct 11, 2024
#1364)

### Summary
> Describe your changes.

Addresses #1363 and #1347.
- Updates all relevant documentation to prefer running docker-compose
for end-users.
- Provides documentation on how to use docker and docker-compose for
developers.

### Checklist

Provide proof that this works (this makes reviews move faster). Please
perform one or more of the following:
- [ ] Update/add unit or integration tests.
- [x] Include a screenshot showing what the graph looked like before and
after your changes.
- [ ] Include console log trace showing what happened before and after
your changes.


#### Proof that this works
- Running an AWS sync using docker-compose
<img width="988" alt="docker-compose-run"
src="https://github.com/user-attachments/assets/33432890-a8be-4630-9340-60e8875d55d6">


  CLI used:
  ```
docker-compose run -e AWS_PROFILE=1234_testprofile -e
AWS_DEFAULT_REGION=us-east-1 cartography --neo4j-uri
bolt://cartography-neo4j-1:7687
  ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale stalebot believes this issue/PR is no longer active
Projects
None yet
Development

No branches or pull requests

2 participants