-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
||
# copy in static files (configs, scripts) | ||
COPY 10-network-security.conf /etc/sysctl.d/10-network-security.conf | ||
COPY 11-tcp-mtu-probing.conf /etc/sysctl.d/11-tcp-mtu-probing.conf | ||
|
@@ -106,6 +108,17 @@ 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 commentThe 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 commentThe 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 commentThe 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 commentThe 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 commentThe 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 commentThe 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. At least until there is an official package available. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
RUN export ARCH=$(dpkg --print-architecture | sed 's/ppc64el/ppc64le/' | sed 's/armhf/arm-v7/') \ | ||
&& echo "Installing buildkit ..." \ | ||
&& export BUILDKIT_BASE_URL="https://github.com/moby/buildkit/releases/download/${BUILDKIT_VERSION}" \ | ||
&& 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 commentThe 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/buildkit-runc \ | ||
&& chmod 755 /usr/local/bin/buildkitd | ||
|
||
# Install cri-o/podman dependencies: | ||
RUN sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && \ | ||
curl -LO https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_20.04/Release.key && \ | ||
|
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