-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
KIC: Install buildkit package for use with containerd #9646
Conversation
@@ -106,6 +106,12 @@ RUN sh -c "echo 'deb https://download.docker.com/linux/ubuntu focal stable' > /e | |||
apt-key add - < docker.key && \ | |||
clean-install docker-ce docker-ce-cli containerd.io | |||
|
|||
# install buildkit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the comment to mention why we're pulling from this repo as opposed to an official one? It seems suspect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no official one yet, and I haven't made the request yet...
It's built from https://github.com/afbjorklund/buildkit/tree/debian
Basically I copied the ubuntu packaging for "runc", for "buildkit"
Probably should upload the .dsc and the tarballs to bintray.com ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See also #9552
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a similar hack for podman
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it really need to be dpkg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't have to be, no. We just preferred using regular system packages, and getting all the software from one place.
But since we moved from ubuntu.com to docker.com for runc/containerd/dockerd - we can get buildkit from github.com
At least until there is an official package available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adopted the containerd installation script from kind, and adopted to minor quirks in the buildkit release.
I asked the question about official .deb packages in moby/buildkit#1794 But it only has static executables for now, could switch to those I guess. https://github.com/moby/buildkit/releases/tag/v0.7.2
|
1644852
to
de2013e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple suggestions around the dockerfile.
&& curl -sSL --retry 5 --output /tmp/buildkit.tgz "${BUILDKIT_BASE_URL}/buildkit-${BUILDKIT_VERSION}.linux-${ARCH}.tar.gz" \ | ||
&& tar -C /usr/local -xzvf /tmp/buildkit.tgz \ | ||
&& rm -rf /tmp/buildkit.tgz \ | ||
&& chmod 755 /usr/local/bin/buildctl \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to shorten this, we could chmod all three files in one command:
chmod 755 /usr/local/bin/build*
@@ -21,6 +21,8 @@ | |||
# for a kubernetes node image, it doesn't contain much we don't need | |||
FROM ubuntu:focal-20200925 | |||
|
|||
ARG BUILDKIT_VERSION="v0.7.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think it would help readability to run this line right before we install buildkit, so it's easy to see everything at once
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afbjorklund, medyagh, priyawadhwa The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
For #9640