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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't ignore .git folder in docker build #1035

Merged
merged 1 commit into from
May 15, 2023
Merged

Conversation

lovromazgon
Copy link
Member

Description

This makes sure our docker build includes the .git folder, which should give us access to the git tag and let us build the version string 馃

Fixes (hopefully) #895

@lovromazgon lovromazgon requested a review from a team as a code owner May 12, 2023 15:25
Copy link
Contributor

@maha-hajja maha-hajja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's hope it works 馃馃徏

@hariso
Copy link
Contributor

hariso commented May 15, 2023

IIRC, it was removed to reduce Docker build time. WDYT about getting the version from git and saving it to a file, then sending it to Docker?

@lovromazgon
Copy link
Member Author

lovromazgon commented May 15, 2023

I just tried it out to see what difference it makes, I ran docker build -f Dockerfile -t conduit-local . and then removed the image two times in a row (second run caches almost everything except loading the context). I ran it on main and on this branch, here are the results:

  • main first run 79.8s, second run 5.0s
  • lovro/dockerignore first run 74.4s, second run 6.3s

I wouldn't say that's a noticeable difference and I don't think we should optimize this further if it solves the problem, it's just not worth it. Especially because our docker builds are triggered nightly and on releases, a few seconds don't make a difference there.

@hariso
Copy link
Contributor

hariso commented May 15, 2023

Definitely, just one second of difference is not worth it.

@lovromazgon lovromazgon merged commit d8a0f6a into main May 15, 2023
3 checks passed
@lovromazgon lovromazgon deleted the lovro/dockerignore branch May 15, 2023 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants