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

Use better Dockerfile layer ordering to maximize cacheability #2683

Merged

Conversation

devinrsmith
Copy link
Member

No description provided.

copyFile('project', '/project')
workingDir('/project')
environmentVariable 'DH_HOST', deephavenDocker.containerName.get()
environmentVariable 'DH_PORT', '8080'
Copy link
Member

Choose a reason for hiding this comment

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

wouldnt it be better to set these first, to avoid adding two more layers each time any project contents change?

Copy link
Member Author

@devinrsmith devinrsmith Jul 26, 2022

Choose a reason for hiding this comment

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

containerName is randomized with every gradle invocation, so each time it changes it busts all the layers after it.

Copy link
Member

Choose a reason for hiding this comment

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

Ah fair point. The port is still fair game, but approved.

@devinrsmith devinrsmith merged commit 5239c39 into deephaven:main Jul 26, 2022
@devinrsmith devinrsmith deleted the deephaven-docker-layer-ordering branch July 26, 2022 21:10
@github-actions github-actions bot locked and limited conversation to collaborators Jul 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants