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

Docker build fails on linux due to dockerignore and git ls-files conflict #2632

Closed
AlexSzlavik opened this issue Sep 7, 2024 · 5 comments
Closed
Labels
triage Issue needs triaging

Comments

@AlexSzlavik
Copy link
Contributor

Docker image builds are broken on Linux due to the inclusion of /**/.idea in .dockerignore. Docker build will not copy the .idea directory, and the following step fails during build. Not sure why this doesn't fail on MacOS.

https://github.com/TBD54566975/ftl/blob/14f4a371ad8011284d1e4031d734badd9176f23d/Dockerfile.controller#L24

Reproduce

just build-docker controller on a linux system.
Tested that this is the issue by commenting out .idea in .dockerignore.

Suggested fix

Omit files in .dockignore when performing the timestamp reset step above.

@github-actions github-actions bot added the triage Issue needs triaging label Sep 7, 2024
@alecthomas
Copy link
Collaborator

Want to just send a PR?

@alecthomas
Copy link
Collaborator

Although, this seems to work fine in CI: https://github.com/TBD54566975/ftl/actions/runs/10736216723/job/29775141104

@AlexSzlavik
Copy link
Contributor Author

AlexSzlavik commented Sep 7, 2024 via email

@AlexSzlavik
Copy link
Contributor Author

Yea, that's the thing I couldn't reconcile either. I imagine it's something in my env, but conceptually I think something is off. The touch should create the file if it doesn't exist, but i still think that's technically incorrect, since the build wanted to ignore those files.

@AlexSzlavik
Copy link
Contributor Author

So apparently I wasn't using docker's BuildKit component (on my Arch Linux setup) to build, which led to bizzare issues. Closing since it works after all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue needs triaging
Projects
None yet
Development

No branches or pull requests

2 participants