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

Multistage dockerfile example #571

Merged

Conversation

kentbull
Copy link
Contributor

This is a slight elaboration on Jason's initial work.

Moving the COPY src/ src/ from the build stage to the runtime stage enables near instantaneous builds for source-only updates.

The RUN mkdir /keripy/src in the build layer enables the setup.py and requirements.txt to be able to fully execute.

Building from scratch, or with no cache, a linux/amd64 image on my Mac takes about 25 minutes. This Dockerfile enables me to have a build that is less than 5 seconds when there are source only changes. However, dependency changes still require a full rebuild.

@pfeairheller pfeairheller merged commit 5f82f9b into WebOfTrust:development Oct 30, 2023
@kentbull kentbull deleted the multistage-dockerfile-example branch May 15, 2024 22:34
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.

3 participants