-
Notifications
You must be signed in to change notification settings - Fork 29
containerd package #14
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
Merged
Merged
Changes from all commits
Commits
Show all changes
223 commits
Select commit
Hold shift + click to select a range
8924669
Add initial rpm building materials
seemethere ce2462f
Add debian package building for ubuntu xenial
seemethere 5973981
Remove protobuf as a build requirement
seemethere acd2e1a
Merge pull request #1 from seemethere/xenial
andrewhsu dee48fd
Package containered on centos
e28b235
get containerd 1.1.0 rpm building working
andrewhsu 20bf11b
Added a clean target for rpm based builds. Removed unecessary librari…
743e37f
Fix sha256 check
e379342
Merge pull request #2 from jose-bigio/build
andrewhsu 1c1e7a6
added man pages for centos
0b69f0c
Merge pull request #7 from jose-bigio/rpm_man_pages
seemethere bee7cbb
Make package building distro agnostic
seemethere 7c9e7aa
Allow for nightly package building
seemethere 7a8a61d
Update to put the config in the correct place
seemethere d2d05aa
Do correct version for test versions
seemethere 4af1080
Add some documentation
seemethere e7d95ff
Remove some unsused comments / declarations
seemethere 2d4f464
Merge pull request #12 from seemethere/refactor
andrewhsu 8bfa406
Add a Jenkinsfile to build containerd packages
corbin-coleman 12621cb
Remove verification scripts
corbin-coleman 40c7c55
Merge pull request #9 from corbin-coleman/add-jenkinsfile
seemethere 4979f7e
Switch to using containerd build rigging
seemethere 92bee30
Merge pull request #15 from seemethere/use_make
seemethere 48f26bc
Make version report correctly on binaries
seemethere 1e6ab12
Merge pull request #21 from seemethere/fix_version
seemethere 222adea
move all rpm build deps into spec file
andrewhsu aadd933
move go-md2man to an rpm build dep
andrewhsu 8ca5bfd
Merge pull request #24 from andrewhsu/move-deps
seemethere 9c5f3fe
Merge pull request #25 from andrewhsu/dep-man
seemethere 60aad67
Change DEB package name to containerd.io
seemethere ce2cd12
Change RPM package name to containerd.io
seemethere cc0031a
Change INSTALL_DIR to correct one
seemethere 49da6df
Move provides/conflicts/replaces to correct section
seemethere eced16c
Merge pull request #18 from seemethere/change
seemethere 5dda812
Add installer for runc
seemethere fb582cd
Merge pull request #28 from seemethere/runc
seemethere cc5c78c
Change location of runc.tar
seemethere 41d12eb
Merge pull request #36 from seemethere/change_locale
seemethere 624c841
Bump to v1.2.0-beta.0
seemethere 1be55b8
Merge pull request #37 from seemethere/bump
seemethere f128203
Add stuff to build sles
seemethere c6a78c3
Merge pull request #38 from seemethere/sles
d92d5f9
bump ver 1.2.0 beta.2
andrewhsu 661b311
Merge pull request #44 from andrewhsu/b2
andrewhsu 116da74
Hardcode libexec paths and var lib paths
seemethere 82b33b9
Bump RPM version to 1.2.0-1.2.beta.2-2
seemethere 445d8b8
Update rpm version to include actual rpm release
seemethere 184d64d
Remove runc image, removes offline installer
seemethere 408d8f8
Add in runc as something we build and package
seemethere c0f01a4
Merge pull request #50 from seemethere/runc_again
seemethere 950d59d
Increment containerd version for deb, add changelog
seemethere ea05eae
Merge pull request #51 from seemethere/deb
seemethere 7a31603
bump to 1.2.0-rc.0
seemethere f851a91
Compile runc with 'seccomp apparmor selinux'
seemethere abb7116
Merge pull request #53 from seemethere/runc_compile_fix
andrewhsu 5f1b356
Merge pull request #52 from seemethere/s
seemethere 5329dd4
Add 1.2.0-rc.1 release
seemethere ec4af30
Merge pull request #54 from seemethere/120_rc1
dave-tucker 5ca6dab
Add a changelog note about the containerd changes
seemethere 69d7fb1
Merge pull request #56 from seemethere/changelog_update
seemethere 3839e7d
containerd 1.2.0-rc.2 release
seemethere ef4625f
Merge pull request #57 from seemethere/u
seemethere 8419739
Bump changelogs for 1.2.0 release
seemethere d13eb8f
Merge pull request #58 from seemethere/120
seemethere 9ec7832
Mark package as "providing", "conflicting" and "obsoletes" runc
thaJeztah 5e1bd7c
Release contaienrd 1.2.1-rc.0
thaJeztah 02cceba
Merge pull request #64 from thaJeztah/bump_containerd_v1.2.1-rc.0
andrewhsu 8834b3b
Do not enable kmem on RHEL7 kernels
thaJeztah 69727d3
Merge pull request #66 from thaJeztah/nokmem_on_rhel
seemethere 3feaabe
Remove go-md2man as a BuildRequires, prefer go get
seemethere a15a66a
Merge pull request #68 from docker/remove_gomd2man
seemethere a955c6e
bump ver for containerd 1.2.1 release
andrewhsu dcd74d0
update runc to 96ec217
andrewhsu 790c80b
Merge pull request #67 from andrewhsu/121
seemethere 0199f94
bump ver for containerd 1.2.2 rel
andrewhsu 02e72eb
Bump to package version 1.2.2-2
seemethere ab0e225
Merge pull request #77 from seemethere/bump
seemethere 01930df
Bump containerd.io version to 1.2.2-3
seemethere 1a178e7
Merge pull request #79 from seemethere/new_runc
andrewhsu 1fbd3cb
Release containerd 1.2.4
thaJeztah 16f6111
Merge pull request #81 from thaJeztah/containerd_1.2.4
andrewhsu b45f6cf
RHEL 8 Support
b59c29c
Merge pull request #83 from docker/rhel8
seemethere e069209
Release containerd 1.2.5
thaJeztah 68ae78e
Merge pull request #86 from thaJeztah/containerd_1.2.5
andrewhsu c2a1226
Release containerd 1.2.6
thaJeztah b312f4f
Set packagename to containerd.io in version, and make it configurable
thaJeztah 0ce68e4
Merge pull request #84 from thaJeztah/fix_package_name
seemethere 9fb701a
Release containerd 1.2.6-2
thaJeztah a1b51fc
Merge pull request #93 from thaJeztah/release_containerd_1.2.6-2
seemethere 4c09fba
rpm/containerd.spec: move runc to /usr/bin
kolyshkin 7a533d9
rpm/containerd.spec: add req for container-selinux
kolyshkin 282a4c2
rpm/containerd.spec: workarounds for suse and amazon
kolyshkin 207a2b8
rpm/containerd.spec: add container-selinux req (#95)
seemethere c0c1a7f
debian: move runc from sbin to bin
seemethere fad8b7d
[TAR-852] debian: move runc from sbin to bin (#97)
seemethere 2b91d10
Refactor to be image based, see description
seemethere 1b17cc1
rpm/containerd.spec: Fix changelog date being one month off
thaJeztah 7d92067
Merge pull request #99 from thaJeztah/fix_changelog_date
zelahi 87e3774
Merge pull request #75 from seemethere/refactor
zelahi 177fb32
rpm: Do not provides runc on rhel 8
seemethere b4fb870
Merge pull request #102 from seemethere/no_provides_runc_rhel_8
seemethere 9c2a22a
Bump golang 1.11.13 (CVE-2019-9512, CVE-2019-9514)
thaJeztah 399ff2b
Merge pull request #103 from thaJeztah/bump_golang_1.11.13
justincormack 5012bfc
Release containerd 1.2.8
thaJeztah d84b587
Merge pull request #98 from thaJeztah/containerd_1.2.7
seemethere c88095a
bump changelogs for containerd 1.2.9
seemethere 52ae6dd
Merge pull request #106 from seemethere/bump_1_2_9
seemethere 4920a43
bump version to 1.2.10-1
seemethere 4b7dd16
bump to golang 1.12.10
seemethere d8cd570
[TAR-1202] bump version to 1.2.10-1 (#110)
seemethere f59500a
bump to containerd 1.2.10-2
seemethere 2d39e41
bump to containerd 1.2.10-2 (#111)
seemethere 1db70e9
deb pkgs: restart after upgrade
andrewhsu 70bd402
Merge pull request #113 from andrewhsu/restart
seemethere ae3baaf
deb: Bump to 1.2.10-3
seemethere 690591c
Merge pull request #114 from seemethere/bump_1_2_10_3
seemethere 512a6ba
deb: Replace all instances of try-restart with restart
seemethere 38ac468
Merge pull request #115 from seemethere/no_try_just_do
seemethere c62d498
update to 1.12.11
ehazlett 00446c4
Merge pull request #125 from ehazlett/update-1.12.11
ehazlett a173c64
update golang to 1.12.15
thaJeztah 558b548
Merge pull request #129 from thaJeztah/bump_golang_1.12.15
ehazlett 46bfabb
Update packaging for containerd 1.2.12
dmcgowan 6b1fb3b
Merge pull request #133 from dmcgowan/update-1.2.12
dmcgowan 7a96ecb
release 1.2.13-1
thaJeztah 4503394
Add Apache License to open source the repository
glours f49254d
Merge pull request #136 from glours/add_apache_license
thaJeztah f40fc6b
Merge pull request #135 from thaJeztah/release_1.2.13
tiborvass 0f382c3
deb: fix formatting and missing dates in changelog
thaJeztah 23737a6
Merge pull request #143 from thaJeztah/fix_changelog_dates
silvin-lubecki cd85ed7
Fix date in changelog
thaJeztah 873da2c
Merge pull request #145 from thaJeztah/fix_more_changelog_dates
thaJeztah fd34302
rpm: add support for building on CentOS 8
thaJeztah 3afd572
Merge pull request #148 from thaJeztah/build_centos8
silvin-lubecki 7a521a8
deb: add missing format version
thaJeztah 0f07931
Merge pull request #150 from thaJeztah/deb_missing_format_version
silvin-lubecki eeaaaf6
rpm: add libseccomp to "requires"
thaJeztah f7b3b02
Merge pull request #157 from thaJeztah/fix_dependency
silvin-lubecki 8d9bbd5
build all binaries instead of individual targets
thaJeztah 743aefd
deb: remove "INSTALL_DIR" variable
thaJeztah c90b7bc
Merge pull request #146 from thaJeztah/build_all_binaries
silvin-lubecki 6293f67
deb: include man pages, and fix man pages in rpms
thaJeztah 0613815
Merge pull request #165 from thaJeztah/add_deb_manpages
glours 06cd35b
Dockerfiles: Use buildkit mounts to prevent copying things
thaJeztah 45c1105
Update readme's
thaJeztah 9e0c47b
Merge pull request #154 from thaJeztah/build_not_run
silvin-lubecki eaea00e
Prepare 1.2.13-2 release
thaJeztah e883c6c
Merge pull request #179 from thaJeztah/release_1.12.13-2
tiborvass 06e2cc2
rpm: containerd 1.2 compatible BUILDTAGS variable
ef8633b
Merge pull request #180 from tiborvass/buildtags-containerd-12
thaJeztah 394c6a8
release 1.3.7-1
thaJeztah 0d3aebf
Merge pull request #198 from thaJeztah/containerd_1.3.7
tiborvass b88d5cb
release 1.4.1-1
f0245fb
release 1.4.2
thaJeztah 5c28b0c
release 1.4.3 (CVE-2020-15257)
thaJeztah bca0863
Merge pull request #204 from thaJeztah/release_containerd_1.4.2
tiborvass 6f4c764
remove default "containerd.toml" config file
thaJeztah e52b0ef
deb: remove dh-systemd dependency as it's deprecated
thaJeztah 8cd7d10
Add changelog for containerd v1.4.3-2
2569d3f
Merge pull request #221 from tiborvass/update_runc
tiborvass 7297473
Add changelog for containerd v1.4.4-1
fuweid 1f929f4
Disable go modules (GO111MODULE=off) to force using vendor directory …
thaJeztah 1e34ff6
Merge pull request #226 from thaJeztah/force_vendor
tiborvass 001c4db
Merge pull request #223 from fuweid/update-changelog-1.4.4
tiborvass aea4411
debian: update image name
fuweid c30d5c3
Merge pull request #228 from fuweid/update-readme
thaJeztah a2f85af
Merge pull request #215 from thaJeztah/remove_containerd_config
thaJeztah 0cc4b79
Revert "remove default "containerd.toml" config file"
thaJeztah 4121050
prepare release v1.4.5
thaJeztah 3e9e050
Merge pull request #233 from thaJeztah/partial_revert_of_config_changes
fredericdalleau 6188d98
Merge pull request #232 from thaJeztah/release_1.4.5
fredericdalleau 82e0b1c
prepare release v1.4.6
thaJeztah f93997c
Merge pull request #234 from thaJeztah/release_1.4.6
fredericdalleau 3f8d92f
deb: fix use of PREFIX and DESTDIR for changes in containerd
thaJeztah a302a23
Merge pull request #237 from thaJeztah/fix_main_builds
fredericdalleau 2fea2dd
RPM : Update libseccomp dependency name for SLES/openSUSE distros
anujajakhade 68969fe
Merge pull request #240 from linux-on-ibm-z/s390x-changes
thaJeztah 24e3ef3
prepare release v1.4.7
thaJeztah e9e0164
Merge pull request #241 from thaJeztah/prepare_release_1.4.7
thaJeztah 40f93bc
prepare release v1.4.8
thaJeztah 7dd2e31
Merge pull request #245 from thaJeztah/prepare_release_1.4.8
thaJeztah 9c11883
prepare release v1.4.9
thaJeztah d10bb73
Merge pull request #247 from thaJeztah/prepare_release_1.4.9
thaJeztah 2079c6f
Use GO111MODULE=auto instead of "off"
thaJeztah e0c365d
Merge pull request #249 from thaJeztah/use_auto_modules
thaJeztah 89cd560
prepare release v1.4.10
thaJeztah ebd3b77
Merge pull request #250 from thaJeztah/release_1.4.10
thaJeztah 947de92
prepare release v1.4.11
thaJeztah aaae050
Merge pull request #254 from thaJeztah/prepare_release_1.4.11
thaJeztah 7ef12fd
deb: force dpkg-build to use xz compression instead of zstd
thaJeztah 39e4a69
Merge pull request #257 from thaJeztah/disable_zstd_compression
thaJeztah 59101e3
prepare release v1.4.12
thaJeztah 7a3fe37
Merge pull request #259 from thaJeztah/containerd_1.4.12
thaJeztah c8a9f26
prepare release v1.4.13
thaJeztah a300e93
update years in license headers
thaJeztah 9e2685a
Merge pull request #268 from thaJeztah/release_1.4.13
thaJeztah 7287c6f
prepare release v1.5.10
thaJeztah cfc76f2
Merge pull request #269 from thaJeztah/update_containerd_1.5.10
thaJeztah da4af28
prepare release v1.5.11
thaJeztah 8857757
Merge pull request #273 from thaJeztah/prepare_release_1.5.11
thaJeztah 8fbf7cc
changelog: add go 1.17.8 update
thaJeztah 765a385
Merge pull request #275 from thaJeztah/prepare_release_1.5.11_addendum
thaJeztah 1c9d72e
prepare release v1.6.2
thaJeztah 3a8d148
prepare release v1.6.3
thaJeztah 320ad25
Merge pull request #278 from thaJeztah/update_containerd_1.6.2
thaJeztah 6d1d026
Also build for CentOS 9.
Romain-Geissler-1A f005a88
Merge pull request #283 from thaJeztah/carry_270_centos9
thaJeztah 8a93622
prepare release v1.6.4
thaJeztah 5d27e78
Merge pull request #282 from thaJeztah/update_containerd_1.6.4
thaJeztah 696d7c2
remove deprecated containerd and runc build-tags
thaJeztah 55c57d2
prepare release v1.6.5
thaJeztah 85e5556
Merge pull request #284 from thaJeztah/cleanup_buildtags
thaJeztah 3e33f29
Merge pull request #285 from thaJeztah/release_1.6.5
thaJeztah 2794f75
prepare release v1.6.6
thaJeztah ec22a82
Merge pull request #286 from thaJeztah/release_1.6.6
thaJeztah 9357d52
prepare release v1.6.7
thaJeztah 404e0ce
Merge pull request #290 from thaJeztah/prepare_release_1.6.7
thaJeztah 65d6876
prepare release v1.6.8
thaJeztah b0fe183
Merge pull request #292 from thaJeztah/prepare_release_1.6.8
thaJeztah 317b054
Merge remote-tracking branch 'containerd-packaging-pick/master' into …
crazy-max 4012e72
containerd package
crazy-max 36908ae
containerd: add RUNC_REPO and RUNC_VERSION vars
crazy-max File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -31,6 +31,7 @@ jobs: | |
| name: | ||
| - docker-engine | ||
| - docker-cli | ||
| - containerd | ||
| - buildx | ||
| - compose | ||
| - credential-helpers | ||
|
|
||
This file contains hidden or 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 hidden or 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 @@ | ||
| /bin |
This file contains hidden or 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 @@ | ||
| /bin |
This file contains hidden or 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,340 @@ | ||
| # syntax=docker/dockerfile:1 | ||
|
|
||
| # Copyright 2022 Docker Packaging authors | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| ARG XX_VERSION="1.1.2" | ||
| ARG ALPINE_VERSION="3.16" | ||
| ARG DEBIAN_FRONTEND="noninteractive" | ||
|
|
||
| ARG MD2MAN_VERSION="v2.0.1" | ||
| ARG RUNC_REPO="https://github.com/opencontainers/runc.git" | ||
|
|
||
| # go | ||
| ARG GO_IMAGE="golang" | ||
| ARG GO_VERSION="1.18.5" | ||
| ARG GO_IMAGE_VARIANT="buster" | ||
|
|
||
| # pkg matrix | ||
| ARG PKG_RELEASE="debian11" | ||
| ARG PKG_TYPE="deb" | ||
| ARG PKG_DISTRO="debian" | ||
| ARG PKG_SUITE="bullseye" | ||
| ARG PKG_BASE_IMAGE="debian:bullseye" | ||
|
|
||
| # deb specific | ||
| ARG PKG_DEB_EPOCH="5" | ||
| ARG PKG_DEB_REVISION="0" | ||
|
|
||
| # rpm specific | ||
| ARG PKG_RPM_RELEASE="1" | ||
|
|
||
| # cross compilation helper | ||
| FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx | ||
|
|
||
| # go base image to retrieve /usr/local/go | ||
| FROM --platform=$BUILDPLATFORM ${GO_IMAGE}:${GO_VERSION}-${GO_IMAGE_VARIANT} AS go | ||
|
|
||
| # md2man | ||
| FROM go AS go-md2man | ||
| ARG GOPROXY="direct" | ||
| ARG GO111MODULE="on" | ||
| ARG MD2MAN_VERSION | ||
| RUN go install github.com/cpuguy83/go-md2man/v2@${MD2MAN_VERSION} | ||
|
|
||
| # dummy stage for unsupported platforms | ||
| FROM --platform=$BUILDPLATFORM busybox AS builder-dummy | ||
| RUN mkdir -p /out | ||
| FROM scratch AS build-dummy | ||
| COPY --from=builder-dummy /out /out | ||
|
|
||
| # base stage for fetching sources and create final release | ||
| FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} AS base | ||
| RUN apk add --no-cache bash curl file git zip tar | ||
|
|
||
| FROM base AS src | ||
| WORKDIR /src | ||
| ARG CONTAINERD_REPO | ||
| RUN git init . && git remote add origin "${CONTAINERD_REPO}" | ||
| ARG CONTAINERD_VERSION | ||
| RUN git fetch origin "${CONTAINERD_VERSION}" +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* && git checkout -q FETCH_HEAD | ||
|
|
||
| FROM base AS src-tgz | ||
| RUN --mount=from=src,source=/src,target=/containerd \ | ||
| mkdir /out && tar -C / -zcf /out/containerd.tgz --exclude .git containerd | ||
|
|
||
| FROM base AS runc-src | ||
| WORKDIR /src | ||
| ARG RUNC_REPO | ||
| ARG RUNC_VERSION | ||
| RUN git init . && git remote add origin "${RUNC_REPO}" | ||
| RUN --mount=from=src,source=/src,target=/containerd <<EOT | ||
| [ -z "$RUNC_VERSION" ] && RUNC_VERSION=$(cat /containerd/script/setup/runc-version) | ||
| git fetch origin "$RUNC_VERSION" +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* && git checkout -q FETCH_HEAD | ||
| EOT | ||
|
|
||
| FROM base AS runc-src-tgz | ||
| RUN --mount=from=runc-src,source=/src,target=/runc \ | ||
| mkdir /out && tar -C / -zcf /out/runc.tgz --exclude .git runc | ||
|
|
||
| # deb | ||
| FROM --platform=$BUILDPLATFORM ${PKG_BASE_IMAGE} AS build-base-deb | ||
| COPY --from=xx / / | ||
| ARG DEBIAN_FRONTEND | ||
| RUN apt-get update && apt-get install -y apt-utils bash ca-certificates curl devscripts equivs git lsb-release | ||
| ENV GOPROXY="https://proxy.golang.org|direct" | ||
| ENV GOPATH="/go" | ||
| ENV PATH="$PATH:/usr/local/go/bin:$GOPATH/bin" | ||
| COPY --from=go-md2man /go/bin/go-md2man $GOPATH/bin/go-md2man | ||
| ARG PKG_RELEASE | ||
|
|
||
| FROM build-base-deb AS build-deb | ||
| COPY deb /root/package/debian | ||
| ARG TARGETPLATFORM | ||
| RUN mk-build-deps -t "xx-apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/package/debian/control | ||
| WORKDIR /root/package | ||
| COPY --from=src /src ./containerd | ||
| ARG CONTAINERD_VERSION | ||
| ARG PKG_NAME | ||
| ARG PKG_RELEASE | ||
| ARG PKG_DISTRO | ||
| ARG PKG_SUITE | ||
| ARG PKG_PACKAGER | ||
| ARG PKG_DEB_REVISION | ||
| ARG PKG_DEB_EPOCH | ||
| ARG SOURCE_DATE_EPOCH | ||
| RUN --mount=source=internal,target=/internal,rw \ | ||
| --mount=type=bind,from=runc-src,source=/src,target=/go/src/github.com/opencontainers/runc,rw \ | ||
| --mount=type=bind,from=go,source=/usr/local/go,target=/usr/local/go \ | ||
| --mount=type=cache,target=/root/.cache \ | ||
| --mount=type=cache,target=/go/pkg/mod <<EOT | ||
| set -e | ||
| mkdir -p /out | ||
| if [ "$(xx-info arch)" != "$(TARGETPLATFORM= xx-info arch)" ]; then | ||
| echo "$(xx-info arch) architecture is not supported" | ||
| exit 0 | ||
| fi | ||
| mkdir -p $GOPATH/src/github.com/containerd | ||
| ln -snf /root/package/containerd $GOPATH/src/github.com/containerd/containerd | ||
| sed 's#/usr/local/bin/containerd#/usr/bin/containerd#g' $GOPATH/src/github.com/containerd/containerd/containerd.service > /internal/containerd.service | ||
| export GO_SRC_PATH=$GOPATH/src/github.com/containerd/containerd | ||
| export CONTAINERD_REVISION=$(git --git-dir ./containerd/.git rev-parse HEAD) | ||
| xx-go --wrap | ||
| set -x | ||
| chmod -x debian/compat debian/control debian/copyright debian/manpages | ||
| dpkg-buildpackage -us -uc | ||
| pkgoutput="/out/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" | ||
| if [ -n "$(xx-info variant)" ]; then | ||
| pkgoutput="${pkgoutput}/$(xx-info variant)" | ||
| fi | ||
| mkdir -p "${pkgoutput}" | ||
| cp /root/${PKG_NAME}* ${pkgoutput}/ | ||
| EOT | ||
|
|
||
| FROM build-dummy AS builder-deb-darwin | ||
| FROM build-deb AS builder-deb-linux | ||
| FROM build-dummy AS builder-deb-windows | ||
| FROM builder-deb-${TARGETOS} AS builder-deb | ||
|
|
||
| # rpm | ||
| FROM --platform=$BUILDPLATFORM ${PKG_BASE_IMAGE} AS build-base-rpm | ||
| COPY --from=xx / / | ||
| ENV GOPROXY="https://proxy.golang.org|direct" | ||
| ENV GOPATH="/go" | ||
| ENV PATH="$PATH:/usr/local/go/bin:$GOPATH/bin" | ||
| COPY --from=go-md2man /go/bin/go-md2man $GOPATH/bin/go-md2man | ||
| ARG PKG_RELEASE | ||
| RUN <<EOT | ||
| case "$PKG_RELEASE" in | ||
| centos7) | ||
| [ -f /etc/yum.repos.d/CentOS-Sources.repo ] && sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo | ||
| yum install -y git rpm-build rpmlint | ||
| ;; | ||
| centos8) | ||
| [ -f /etc/yum.repos.d/CentOS-Stream-Sources.repo ] && sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Stream-Sources.repo | ||
| [ -f /etc/yum.repos.d/CentOS-Stream-PowerTools.repo ] && sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/CentOS-Stream-PowerTools.repo | ||
| rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial | ||
| dnf install -y git rpm-build rpmlint dnf-plugins-core | ||
| ;; | ||
| centos9) | ||
| rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial | ||
| dnf install -y git rpm-build rpmlint dnf-plugins-core | ||
| dnf config-manager --set-enabled crb | ||
| ;; | ||
| oraclelinux7) | ||
| [ -f /etc/yum.repos.d/CentOS-Sources.repo ] && sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo | ||
| yum install -y git rpm-build rpmlint | ||
| yum-config-manager --enable ol7_addons --enable ol7_optional_latest | ||
| ;; | ||
| oraclelinux8) | ||
| dnf install -y git rpm-build rpmlint dnf-plugins-core | ||
| dnf config-manager --enable ol8_addons | ||
| ;; | ||
| oraclelinux9) | ||
| dnf install -y git rpm-build rpmlint dnf-plugins-core | ||
| dnf config-manager --enable ol9_addons | ||
| ;; | ||
| fedora*) | ||
| dnf install -y git rpm-build rpmlint dnf-plugins-core | ||
| ;; | ||
| esac | ||
| EOT | ||
|
|
||
| FROM build-base-rpm AS build-rpm | ||
| COPY rpm /root/rpmbuild/SPECS | ||
| ARG TARGETPLATFORM | ||
| RUN <<EOT | ||
| set -e | ||
| echo "%_topdir /root/rpmbuild" > /root/.rpmmacros | ||
| case "$PKG_RELEASE" in | ||
| centos7|oraclelinux7) | ||
| yum-builddep -y /root/rpmbuild/SPECS/*.spec | ||
| ;; | ||
| *) | ||
| dnf builddep -y /root/rpmbuild/SPECS/*.spec | ||
| ;; | ||
| esac | ||
| EOT | ||
| WORKDIR /root/rpmbuild | ||
| COPY --from=src-tgz /out/containerd.tgz ./SOURCES/ | ||
| COPY --from=runc-src-tgz /out/runc.tgz ./SOURCES/ | ||
| ARG CONTAINERD_VERSION | ||
| ARG PKG_RELEASE | ||
| ARG PKG_DISTRO | ||
| ARG PKG_SUITE | ||
| ARG PKG_PACKAGER | ||
| ARG PKG_RPM_RELEASE | ||
| ARG SOURCE_DATE_EPOCH | ||
| RUN --mount=source=internal,target=/internal,rw \ | ||
| --mount=type=bind,from=src,source=/src,target=/usr/local/src/containerd,rw \ | ||
| --mount=type=bind,from=runc-src,source=/src,target=/go/src/github.com/opencontainers/runc,rw \ | ||
| --mount=type=bind,from=go,source=/usr/local/go,target=/usr/local/go \ | ||
| --mount=type=cache,target=/root/.cache \ | ||
| --mount=type=cache,target=/go/pkg/mod <<EOT | ||
| set -e | ||
| mkdir -p /out | ||
| if [ "$(xx-info arch)" != "$(TARGETPLATFORM= xx-info arch)" ]; then | ||
| echo "$(xx-info arch) architecture is not supported" | ||
| exit 0 | ||
| fi | ||
| mkdir -p $GOPATH/src/github.com/containerd | ||
| ln -snf /usr/local/src/containerd $GOPATH/src/github.com/containerd/containerd | ||
| sed 's#/usr/local/bin/containerd#/usr/bin/containerd#g' /usr/local/src/containerd/containerd.service > /internal/containerd.service | ||
| cp /internal/* ./SOURCES/ | ||
| rpmVersion=${CONTAINERD_VERSION#v} | ||
| rpmVersion=$(echo $rpmVersion | sed "s/-/~/") | ||
| xx-go --wrap | ||
| set -x | ||
| rpmbuild -ba \ | ||
| --define "_version ${rpmVersion}" \ | ||
| --define "_origversion ${CONTAINERD_VERSION#v}" \ | ||
| --define "_release $PKG_RPM_RELEASE" \ | ||
| --define "_commit $(git --git-dir /usr/local/src/containerd/.git rev-parse HEAD)" \ | ||
| /root/rpmbuild/SPECS/*.spec | ||
| pkgoutput="/out/${PKG_DISTRO}/${PKG_SUITE}/$(xx-info arch)" | ||
| if [ -n "$(xx-info variant)" ]; then | ||
| pkgoutput="${pkgoutput}/$(xx-info variant)" | ||
| fi | ||
| mkdir -p "${pkgoutput}" | ||
| cp ./RPMS/*/*.* ./SRPMS/* ${pkgoutput}/ | ||
| EOT | ||
|
|
||
| FROM build-dummy AS builder-rpm-darwin | ||
| FROM build-rpm AS builder-rpm-linux | ||
| FROM build-dummy AS builder-rpm-windows | ||
| FROM builder-rpm-${TARGETOS} AS builder-rpm | ||
|
|
||
| # static | ||
| FROM --platform=$BUILDPLATFORM ${PKG_BASE_IMAGE} AS build-base-static | ||
| COPY --from=xx / / | ||
| ARG DEBIAN_FRONTEND | ||
| RUN apt-get update && apt-get install -y --no-install-recommends clang dpkg-dev file git lld llvm make pkg-config | ||
| ENV GOPROXY="https://proxy.golang.org|direct" | ||
| ENV GOPATH="/go" | ||
| ENV PATH="$PATH:/usr/local/go/bin:$GOPATH/bin" | ||
| ENV GO111MODULE="off" | ||
| ENV CGO_ENABLED="1" | ||
| ARG TARGETPLATFORM | ||
| RUN xx-apt-get install -y binutils dpkg-dev g++ gcc libbtrfs-dev libseccomp-dev libsecret-1-dev pkg-config | ||
|
|
||
| FROM build-base-static AS build-static | ||
| ARG TARGETPLATFORM | ||
| ARG DOCKER_CLI_VERSION | ||
| ARG CGO_ENABLED | ||
| WORKDIR /go/src/github.com/containerd/containerd | ||
| RUN --mount=type=bind,from=src,source=/src,target=.,rw \ | ||
| --mount=type=bind,from=go,source=/usr/local/go,target=/usr/local/go,rw \ | ||
| --mount=type=cache,target=/root/.cache \ | ||
| --mount=type=cache,target=/go/pkg/mod <<EOT | ||
| set -ex | ||
| xx-go --wrap | ||
| mkdir -p /out/containerd | ||
| export CC=$(xx-info)-gcc | ||
| make STATIC=1 bin/containerd | ||
| make STATIC=1 bin/containerd-shim-runc-v2 | ||
| make STATIC=1 bin/ctr | ||
| xx-verify --static bin/containerd-shim-runc-v2 | ||
| xx-verify --static bin/containerd | ||
| xx-verify --static bin/ctr | ||
| mv bin/* /out/containerd | ||
| EOT | ||
| WORKDIR /go/src/github.com/opencontainers/runc | ||
| # FIXME: should be built using clang but needs https://github.com/opencontainers/runc/pull/3465 | ||
| RUN --mount=type=bind,from=runc-src,source=/src,target=.,rw \ | ||
| --mount=type=bind,from=go,source=/usr/local/go,target=/usr/local/go,rw \ | ||
| --mount=type=cache,target=/root/.cache \ | ||
| --mount=type=cache,target=/go/pkg/mod <<EOT | ||
| set -ex | ||
| xx-go --wrap | ||
| make static | ||
| xx-verify --static runc | ||
| mv runc /out/containerd/ | ||
| EOT | ||
|
|
||
| FROM build-base-static AS builder-static | ||
| ARG DEBIAN_FRONTEND | ||
| RUN apt-get update && apt-get install -y --no-install-recommends bash file zip tar | ||
| WORKDIR /build | ||
| ARG CONTAINERD_VERSION | ||
| ARG TARGETPLATFORM | ||
| RUN --mount=type=bind,from=src,source=/src,target=/src \ | ||
| --mount=type=bind,from=runc-src,source=/src,target=/runc-src \ | ||
| --mount=type=bind,from=build-static,source=/out,target=/build <<EOT | ||
| set -e | ||
| pkgoutput="/out/static/$(xx-info os)/$(xx-info arch)" | ||
| if [ -n "$(xx-info variant)" ]; then | ||
| pkgoutput="${pkgoutput}/$(xx-info variant)" | ||
| fi | ||
| mkdir -p "${pkgoutput}" | ||
| for pkgname in *; do | ||
| workdir=$(mktemp -d -t docker-packaging.XXXXXXXXXX) | ||
| mkdir -p "$workdir/${pkgname}" | ||
| ( | ||
| set -x | ||
| cp ${pkgname}/* /src/LICENSE /src/README.md "$workdir/${pkgname}/" | ||
| cp /runc-src/LICENSE "$workdir/${pkgname}/runc.LICENSE" | ||
| cp /runc-src/README.md "$workdir/${pkgname}/runc.README.md" | ||
| ) | ||
| if [ "$(xx-info os)" = "windows" ]; then | ||
| (set -x ; cd "$workdir" ; zip -r "${pkgoutput}/${pkgname}_${CONTAINERD_VERSION#v}.zip" ${pkgname}) | ||
| else | ||
| (set -x ; tar -czf "${pkgoutput}/${pkgname}_${CONTAINERD_VERSION#v}.tgz" -C "$workdir" ${pkgname}) | ||
| fi | ||
| done | ||
| EOT | ||
|
|
||
| FROM builder-${PKG_TYPE} AS build-pkg | ||
|
|
||
| FROM scratch AS pkg | ||
| COPY --from=build-pkg /out / |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.