Hello, We’re encountering an issue during deploym...
# general
u
Hello, We’re encountering an issue during deployment to Ploomber Cloud: Our Dockerfile includes the line COPY .git ./ because we need Git metadata inside the container (e.g., for commit hashes or tags). However, although .git is not listed in our .gitignore or ploomber-cloud.json ignore rules, it seems to be excluded from the build context automatically. This leads to the following build error:
Copy code
failed to get relative files: lstat /kaniko/buildcontext/.git: no such file or directory
Is .git excluded by default by Ploomber? If so, is there a supported way to force its inclusion in the Docker build context? Thanks in advance for your help!
e
are you using the CLI? I think we have a rule that ignores .git by default. can you try zipping it and using the UI to deploy? if that works, then it's definitely the CLI and we can add an option to include .git
u
Doing that will make our image way more heavy. I will find a workaround for this issue.
JFYI: Locally the docker container works fine. So what is sure is that it is on your side. Probably the CLI as we do deploy from a GA
Can you keep us posted regarding a potential fix 🙏 Our workaround will do it but not ideal for our use case. Thank you.
e
i'm confused about what you're looking for the solution to be our CLI ignores
.git
, I can confirm this. So I suggested adding a flag to the CLI so
.git
is not ignored, but then you mentioned that the image will become larger (which is true, since you'll be including a full repository on it). so what's the ideal behavior that you're looking for in the CLI?
u
I mentioned a larger image regarding "can you try zipping it and using the UI to deploy?"
So I suggested adding a flag to the CLI so
.git
That works for us, when do you think this flag would be available?
e
give us a couple of days
we've fixed this, please upgrade the CLI and update your config