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

Revise Dockerfiles to use caching #38

Merged

Conversation

patrickdemers6
Copy link
Collaborator

Revised the Dockerfiles to improve the use caching.

Dependencies are loaded prior to pulling in source code. I have also moved building the binary to the test/integration/Dockerfile. Then, the root Dockerfile can pull the binary from tagged image. This prevents needing to load dependencies twice.

Before

make integration takes 2 minutes 15 seconds on every build.

After

make integration takes 58 seconds on all builds, unless there are changes to go.mod or go.sum.

That's some Plaid acceleration!


Side note: This makes use of BuildKit which replaces the legacy builder. It is the default builder in latest Docker version. This will still work for users not on latest Docker version as the environment variable DOCKER_BUILDKIT is set.

Closes #35

@patrickdemers6 patrickdemers6 merged commit 2cb04c3 into teslamotors:main Jun 28, 2023
1 check passed
This was referenced Jul 12, 2023
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.

Integration Tests - Go Packages Reinstalled Every Time
2 participants