Matt Housh
1671f5826c
Hardens against CVE-2020-8694, CVE-2020-8695, CVE-2020-12912, and the "PLATYPUS attack". See the following for details: https://github.com/moby/moby/releases/tag/v24.0.7 https://scout.docker.com/vulnerabilities/id/CVE-2020-8694 https://scout.docker.com/vulnerabilities/id/CVE-2020-8695 https://scout.docker.com/vulnerabilities/id/CVE-2020-12912 https://platypusattack.com/
72 lines
2.4 KiB
Plaintext
72 lines
2.4 KiB
Plaintext
# Description: An open platform for distributed applications for developers and sysadmins
|
|
# URL: https://www.docker.com/community-edition
|
|
# Maintainer: Matt Housh, jaeger at crux dot ninja
|
|
# Depends on: containerd runc btrfs-progs cgroupfs-mount
|
|
|
|
name=docker
|
|
version=24.0.7
|
|
release=1
|
|
source=(https://github.com/moby/moby/archive/v${version}/moby-${version}.tar.gz \
|
|
https://github.com/docker/cli/archive/v${version}/cli-${version}.tar.gz \
|
|
http://crux.nu/files/$name-man-pages-$version.tar.xz \
|
|
$name.rc $name.conf)
|
|
|
|
build() {
|
|
export GO111MODULE=auto
|
|
export GOPATH=$SRC
|
|
export DOCKER_GITCOMMIT=311b9ff
|
|
export DOCKER_BUILDTAGS='seccomp'
|
|
export DISABLE_WARN_OUTSIDE_CONTAINER=1
|
|
export CGO_CFLAGS="${CFLAGS}"
|
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
|
export CGO_LDFLAGS="${LDFLAGS}"
|
|
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -ldflags=-linkmode=external"
|
|
|
|
mkdir -p src/github.com/docker
|
|
|
|
pushd src/github.com/docker
|
|
ln -s $SRC/cli-$version cli
|
|
pushd cli
|
|
make VERSION=$version GITCOMMIT=${DOCKER_GITCOMMIT} dynbinary
|
|
popd
|
|
popd
|
|
|
|
pushd src/github.com/docker
|
|
ln -s $SRC/moby-$version docker
|
|
pushd docker
|
|
VERSION=$version hack/make.sh dynbinary
|
|
popd
|
|
popd
|
|
|
|
install -D -m 0755 cli-$version/build/$name $PKG/usr/bin/$name
|
|
install -D -m 0755 moby-$version/bundles/dynbinary-daemon/dockerd \
|
|
$PKG/usr/bin/dockerd
|
|
install -D -m 0755 moby-$version/bundles/dynbinary-daemon/docker-proxy \
|
|
$PKG/usr/bin/docker-proxy
|
|
|
|
for M in 1 5 8; do
|
|
install -d -m 0755 $PKG/usr/share/man/man${M}
|
|
install -m 0644 $SRC/man${M}/* $PKG/usr/share/man/man${M}/
|
|
done
|
|
|
|
install -D -m 0755 $SRC/$name.rc \
|
|
$PKG/etc/rc.d/$name
|
|
install -D -m 0644 $SRC/$name.conf \
|
|
$PKG/etc/$name.conf
|
|
|
|
ln -s containerd $PKG/usr/bin/docker-containerd
|
|
ln -s containerd-shim $PKG/usr/bin/docker-containerd-shim
|
|
ln -s ctr $PKG/usr/bin/docker-containerd-ctr
|
|
ln -s runc $PKG/usr/bin/docker-runc
|
|
|
|
install -D -m 0755 moby-$version/contrib/check-config.sh \
|
|
$PKG/usr/share/$name/check-config.sh
|
|
install -D -m 0644 moby-$version/contrib/udev/80-$name.rules \
|
|
$PKG/etc/udev/rules.d/80-$name.rules
|
|
install -D -m 0644 cli-$version/contrib/completion/bash/docker \
|
|
$PKG/etc/bash_completion.d/docker
|
|
|
|
mkdir -p $PKG/usr/lib/docker/cli-plugins
|
|
}
|