-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description <!--- Please describe what this PR is going to change --> - Use latest v1.0.0 linuxkit images. - Add images dir with runc and containerd to be able to better control the version. - Use latest upstream init as it has cgroups v2 as the default. - Add dhcp to the linuxkit services so that interfaces stay configured after lease times expire. - Update to latest Docker in Docker version and update linuxkit spec to handle cgroups v2. - Increase the kernel command line parameter size to 4096 bytes to allow for longer things to be passed like certs, etc. - Default to linuxkit 1.2.0 binary as the containerd issues are resolved with the ccgroup v2 changes. ## Why is this needed <!--- Link to issue you have raised --> Fixes: # ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
- Loading branch information
Showing
22 changed files
with
258 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e as builder | ||
|
||
|
||
# checkout and compile containerd | ||
# Update `FROM` in `pkg/containerd/Dockerfile`, `pkg/init/Dockerfile` and | ||
# `test/pkg/containerd/Dockerfile` when changing this. | ||
ENV CONTAINERD_REPO=https://github.com/containerd/containerd.git | ||
|
||
ENV CONTAINERD_COMMIT=v1.7.15 | ||
ENV GOPATH=/go | ||
RUN apk add go git | ||
RUN mkdir -p $GOPATH/src/github.com/containerd && \ | ||
cd $GOPATH/src/github.com/containerd && \ | ||
git clone https://github.com/containerd/containerd.git && \ | ||
cd $GOPATH/src/github.com/containerd/containerd && \ | ||
git checkout $CONTAINERD_COMMIT | ||
RUN apk add --no-cache btrfs-progs-dev gcc libc-dev linux-headers make libseccomp-dev | ||
WORKDIR $GOPATH/src/github.com/containerd/containerd | ||
RUN make binaries EXTRA_FLAGS="-buildmode pie" EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"' BUILDTAGS="static_build no_devmapper" | ||
|
||
RUN cp bin/containerd bin/ctr bin/containerd-shim bin/containerd-shim-runc-v2 /usr/bin/ | ||
RUN strip /usr/bin/containerd /usr/bin/ctr /usr/bin/containerd-shim /usr/bin/containerd-shim-runc-v2 | ||
|
||
FROM scratch as containerd-dev | ||
ENTRYPOINT [] | ||
WORKDIR / | ||
COPY --from=builder /usr/bin/containerd /usr/bin/ctr /usr/bin/containerd-shim /usr/bin/containerd-shim-runc-v2 /usr/bin/ | ||
COPY --from=builder /go/src/github.com/containerd/containerd /go/src/github.com/containerd/containerd | ||
|
||
# Dockerfile to build linuxkit/containerd for linuxkit | ||
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e as alpine | ||
|
||
RUN apk add tzdata binutils | ||
RUN mkdir -p /etc/init.d && ln -s /usr/bin/service /etc/init.d/020-containerd | ||
|
||
FROM containerd-dev | ||
|
||
FROM scratch | ||
ENTRYPOINT [] | ||
WORKDIR / | ||
COPY --from=containerd-dev /usr/bin/containerd /usr/bin/ctr /usr/bin/containerd-shim /usr/bin/containerd-shim-runc-v2 /usr/bin/ | ||
COPY --from=alpine /usr/share/zoneinfo/UTC /etc/localtime | ||
COPY --from=alpine /etc/init.d/ /etc/init.d/ | ||
COPY etc etc/ | ||
COPY --from=alpine /etc/apk /etc/apk/ | ||
COPY --from=alpine /lib/apk /lib/apk/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
state = "/run/containerd" | ||
root = "/var/lib/containerd" | ||
disabled_plugins = ["cri"] | ||
|
||
[grpc] | ||
address = "/run/containerd/containerd.sock" | ||
uid = 0 | ||
gid = 0 | ||
|
||
[debug] | ||
address = "/run/containerd/debug.sock" | ||
level = "info" | ||
|
||
[metrics] | ||
address = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.20-alpine as dev | ||
FROM golang:1.21-alpine as dev | ||
COPY . /src/ | ||
WORKDIR /src | ||
RUN go mod download | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.