Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(dogfood): optimize dockerfile for envbuilder cache probing#14497

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedAug 30, 2024
edited
Loading

This PR optimizes our dogfoodDockerfile for envbuilder caching/cache probing by reducing layer sizes and fixing an incompatible instruction.

@mafredrimafredriforce-pushed themafredri/fix-dogfood-docker-optimize-for-envbuilder branch from172bc8d toc8b1addCompareAugust 30, 2024 12:10
@mafredrimafredriforce-pushed themafredri/fix-dogfood-docker-optimize-for-envbuilder branch fromc8b1add toe4fae2fCompareAugust 30, 2024 12:11
@mafredrimafredri marked this pull request as ready for reviewAugust 30, 2024 12:11
ARG GOPATH="/tmp/"
RUN mkdir --parents "$GOPATH" && \
# Install Go utilities.
RUN apt-get install --yes gcc && \
Copy link
Member

Choose a reason for hiding this comment

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

You should still just merge the gcc with the curl apt install above to save build time

Copy link
MemberAuthor

@mafredrimafredriAug 30, 2024
edited
Loading

Choose a reason for hiding this comment

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

It can help cache utilization for when a Go tool version changes, but beyond that I don't see how there would be an improvement in build time?

Installing and uninstalling is a significant size optimization though:

sha256:ef2ad8c02872f01a9e71fc56afdf2ecda2a3d827ac61f5a9e1be0b096b79c335   About a minute ago   RUN /bin/sh -c apt-get install gcc --yes # buildkit                                                 159MB     buildkit.dockerfile.v0

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This is install+cleanup:

sha256:b39c284ff9fac0da7a256f29de3116c5109f4f04e12291ded468314dde50b28a   19 seconds ago   RUN /bin/sh -c apt-get install gcc --yes && apt-get remove --yes gcc && apt-get autoremove --yes && apt-get clean # buildkit   1.64MB    buildkit.dockerfile.v0

I thoughtapt-get update was pretty innocent but it's actually 50MB too. 😅

@mafredrimafredri merged commit13e5c51 intomainAug 30, 2024
26 checks passed
@mafredrimafredri deleted the mafredri/fix-dogfood-docker-optimize-for-envbuilder branchAugust 30, 2024 14:54
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 30, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@deansheatherdeansheatherdeansheather approved these changes

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mafredri@johnstcn@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp