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

--use-copy-link breaks GIT CLONE #2272

Closed
Tracked by #2237
alexcb opened this issue Oct 13, 2022 · 3 comments
Closed
Tracked by #2237

--use-copy-link breaks GIT CLONE #2272

alexcb opened this issue Oct 13, 2022 · 3 comments
Labels
type:bug Something isn't working

Comments

@alexcb
Copy link
Collaborator

alexcb commented Oct 13, 2022

VERSION --use-copy-link 0.6

FROM alpine/git:1.0.7
test:
    WORKDIR /test
    GIT CLONE https://github.com/moby/buildkit.git buildkit
    WORKDIR /test/buildkit
    RUN pwd
    RUN ls -la
    RUN ls -la .git # this fails
    RUN git status
    RUN git branch
    RUN test -f README.md

However if you remove the --use-copy-link feature flag (i.e. only use VERSION 0.6), it works.

@alexcb alexcb added the type:bug Something isn't working label Oct 13, 2022
@alexcb alexcb mentioned this issue Oct 13, 2022
16 tasks
@vladaionescu
Copy link
Member

Strange... A simple solution might be to disable the copy link flag in the git clone. I think this call is the only thing used: https://github.com/earthly/earthly/blob/main/earthfile2llb/converter.go#L1280.

Though I'm not sure what the real cause of this is and whether it might impact other COPYs in subtle ways.

@alexcb
Copy link
Collaborator Author

alexcb commented Oct 13, 2022

it looks like it's being cloned to /buildkit and is ignoring the WORKDIR.

@alexcb
Copy link
Collaborator Author

alexcb commented Oct 21, 2022

fixed with #2273

@alexcb alexcb closed this as completed Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants