Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,89 @@
config BR2_PACKAGE_DOCKER_ENGINE
bool "docker-engine"
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
depends on !BR2_TOOLCHAIN_USES_UCLIBC # containerd -> runc
depends on BR2_USE_MMU # containerd
depends on !BR2_PACKAGE_CGROUPFS_MOUNT
depends on BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS # libseccomp
select BR2_PACKAGE_CGROUPFS_V2_MOUNT if !BR2_PACKAGE_SYSTEMD # runtime dependency
select BR2_PACKAGE_CONTAINERD # runtime dependency
select BR2_PACKAGE_HOST_GO
select BR2_PACKAGE_IPTABLES # runtime dependency
select BR2_PACKAGE_LIBSECCOMP
help
Docker is a platform to build, ship,
and run applications as lightweight containers.
https://github.com/docker/docker
if BR2_PACKAGE_DOCKER_ENGINE
config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS
bool "btrfs filesystem driver"
help
Build the btrfs filesystem driver for Docker.
config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER
bool "devicemapper filesystem driver"
depends on BR2_TOOLCHAIN_HAS_THREADS # lvm2
depends on BR2_USE_MMU # lvm2
select BR2_PACKAGE_LVM2
help
Build the devicemapper filesystem driver for Docker.
config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS
bool "vfs filesystem driver"
depends on BR2_USE_WCHAR # gvfs
depends on BR2_USE_MMU # gvfs
depends on BR2_TOOLCHAIN_HAS_THREADS # gvfs
depends on !BR2_STATIC_LIBS # gvfs
select BR2_PACKAGE_GVFS
help
Build the vfs filesystem driver for Docker.
choice
bool "support docker-init"
default BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_TINI if BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT # legacy
help
Support providing a minimal init process for containers.
Required to use "docker run --init".
config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_NONE
bool "none"
help
Do not support docker-init.
config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_CATATONIT
bool "catatonit"
select BR2_PACKAGE_CATATONIT # runtime
help
Support providing a minimal init process for containers,
using catatonit.
config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_TINI
bool "tini"
select BR2_PACKAGE_TINI # runtime
help
Support providing a minimal init process for containers,
using tini.
endchoice
config BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_NAME
string
default "tini" if BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_TINI
default "catatonit" if BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_CATATONIT
endif
comment "docker-engine needs a glibc or musl toolchain w/ threads, headers >= 5.2"
depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
depends on BR2_PACKAGE_LIBSECCOMP_ARCH_SUPPORTS
depends on !BR2_TOOLCHAIN_HAS_THREADS || \
BR2_TOOLCHAIN_USES_UCLIBC || \
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_2
depends on BR2_USE_MMU

View File

@@ -0,0 +1,72 @@
#!/bin/sh
DAEMON="dockerd"
PIDFILE="/var/run/$DAEMON.pid"
DOCKERD_ARGS=""
# shellcheck source=/dev/null
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
start() {
printf 'Starting %s: ' "$DAEMON"
# Dockerd logs only to stdout/stderr, which is lost with
# --background. The wrapper script runs the given command
# (after "--", including dockerd) and forwards stdout/stderr
# to syslog.
# shellcheck disable=SC2086 # we need word splitting for DOCKERD_ARGS
start-stop-daemon --start --background --pidfile "$PIDFILE" \
--exec /usr/libexec/dockerd-syslog-wrapper.sh \
-- "/usr/bin/$DAEMON" --pidfile "$PIDFILE" $DOCKERD_ARGS
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
start-stop-daemon --stop --pidfile "$PIDFILE" --exec "/usr/bin/$DAEMON"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
return "$status"
fi
while start-stop-daemon --stop --test --quiet --pidfile "$PIDFILE" \
--exec "/usr/bin/$DAEMON"; do
sleep 0.1
done
rm -f "$PIDFILE"
return "$status"
}
restart() {
stop
start
}
reload() {
printf "Reloading %s config: " "$DAEMON"
start-stop-daemon --stop --signal HUP -q --pidfile "$PIDFILE" \
--exec "/usr/bin/$DAEMON"
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
case "$1" in
start|stop|restart|reload)
"$1";;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 0e450c03c536a1304ba8fd26ca4c4ff96fac62182fd042fec90ffdf4a0969d40 docker-engine-28.5.2-go2.tar.gz
sha256 7c87873291f289713ac5df48b1f2010eb6963752bbd6b530416ab99fc37914a8 LICENSE

View File

@@ -0,0 +1,143 @@
################################################################################
#
# docker-engine
#
################################################################################
DOCKER_ENGINE_VERSION = 28.5.2
DOCKER_ENGINE_SITE = $(call github,moby,moby,v$(DOCKER_ENGINE_VERSION))
DOCKER_ENGINE_LICENSE = Apache-2.0
DOCKER_ENGINE_LICENSE_FILES = LICENSE
DOCKER_ENGINE_DEPENDENCIES = host-pkgconf libseccomp
DOCKER_ENGINE_GOMOD = github.com/docker/docker
DOCKER_ENGINE_CPE_ID_VENDOR = mobyproject
DOCKER_ENGINE_CPE_ID_PRODUCT = moby
DOCKER_ENGINE_LDFLAGS = \
-X $(DOCKER_ENGINE_GOMOD)/dockerversion.BuildTime="" \
-X $(DOCKER_ENGINE_GOMOD)/dockerversion.GitCommit="buildroot" \
-X $(DOCKER_ENGINE_GOMOD)/dockerversion.IAmStatic="false" \
-X $(DOCKER_ENGINE_GOMOD)/dockerversion.InitCommitID="" \
-X $(DOCKER_ENGINE_GOMOD)/dockerversion.Version="$(DOCKER_ENGINE_VERSION)"
DOCKER_ENGINE_TAGS = cgo exclude_graphdriver_zfs
DOCKER_ENGINE_BUILD_TARGETS = cmd/dockerd cmd/docker-proxy
ifeq ($(BR2_PACKAGE_LIBAPPARMOR),y)
DOCKER_ENGINE_DEPENDENCIES += libapparmor
endif
ifeq ($(BR2_INIT_SYSTEMD),y)
DOCKER_ENGINE_DEPENDENCIES += systemd
DOCKER_ENGINE_TAGS += systemd journald
endif
DOCKER_ENGINE_INIT_NAME = $(call qstrip,$(BR2_PACKAGE_DOCKER_ENGINE_DOCKER_INIT_NAME))
ifneq ($(DOCKER_ENGINE_INIT_NAME),)
define DOCKER_ENGINE_INIT
mkdir -p $(TARGET_DIR)/usr/libexec/docker
ln -sf ../../bin/$(DOCKER_ENGINE_INIT_NAME) \
$(TARGET_DIR)/usr/libexec/docker/docker-init
endef
DOCKER_ENGINE_POST_INSTALL_TARGET_HOOKS += DOCKER_ENGINE_INIT
endif
ifneq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y)
DOCKER_ENGINE_TAGS += exclude_graphdriver_btrfs
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER),y)
DOCKER_ENGINE_DEPENDENCIES += lvm2
else
DOCKER_ENGINE_TAGS += exclude_graphdriver_devicemapper
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_VFS),y)
DOCKER_ENGINE_DEPENDENCIES += gvfs
else
DOCKER_ENGINE_TAGS += exclude_graphdriver_vfs
endif
# create the go.mod file with language version go1.19
# remove the conflicting vendor/modules.txt
# https://github.com/moby/moby/issues/44618#issuecomment-1343565705
define DOCKER_ENGINE_FIX_VENDORING
printf "module $(DOCKER_ENGINE_GOMOD)\n\ngo 1.19\n" > $(@D)/go.mod
rm -f $(@D)/vendor/modules.txt
endef
DOCKER_ENGINE_POST_EXTRACT_HOOKS += DOCKER_ENGINE_FIX_VENDORING
define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.service \
$(TARGET_DIR)/usr/lib/systemd/system/docker.service
$(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.socket \
$(TARGET_DIR)/usr/lib/systemd/system/docker.socket
endef
define DOCKER_ENGINE_INSTALL_INIT_SYSV
$(INSTALL) -D -m 755 package/docker-engine/S60dockerd \
$(TARGET_DIR)/etc/init.d/S60dockerd
$(INSTALL) -D -m 755 package/docker-engine/dockerd-syslog-wrapper.sh \
$(TARGET_DIR)/usr/libexec/dockerd-syslog-wrapper.sh
endef
define DOCKER_ENGINE_USERS
- - docker -1 * - - - Docker Application Container Framework
endef
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS),y)
define DOCKER_ENGINE_DRIVER_BTRFS_LINUX_CONFIG_FIXUPS
$(call KCONFIG_ENABLE_OPT,CONFIG_BTRFS_FS)
$(call KCONFIG_ENABLE_OPT,CONFIG_BTRFS_FS_POSIX_ACL)
endef
endif
ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DRIVER_DEVICEMAPPER),y)
define DOCKER_ENGINE_DRIVER_DM_LINUX_CONFIG_FIXUPS
$(call KCONFIG_ENABLE_OPT,CONFIG_MD)
$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_DM)
$(call KCONFIG_ENABLE_OPT,CONFIG_MD_THIN_PROVISIONING)
endef
endif
# based on contrib/check-config.sh
define DOCKER_ENGINE_LINUX_CONFIG_FIXUPS
$(call KCONFIG_ENABLE_OPT,CONFIG_POSIX_MQUEUE)
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
$(call KCONFIG_ENABLE_OPT,CONFIG_MEMCG)
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_SCHED)
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_FREEZER)
$(call KCONFIG_ENABLE_OPT,CONFIG_CPUSETS)
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_DEVICE)
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUP_CPUACCT)
$(call KCONFIG_ENABLE_OPT,CONFIG_NAMESPACES)
$(call KCONFIG_ENABLE_OPT,CONFIG_UTS_NS)
$(call KCONFIG_ENABLE_OPT,CONFIG_IPC_NS)
$(call KCONFIG_ENABLE_OPT,CONFIG_PID_NS)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_NS)
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER)
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED)
$(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE_NETFILTER)
$(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK)
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XTABLES)
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_ADDRTYPE)
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_CONNTRACK)
$(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XT_MATCH_IPVS)
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES)
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER)
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_NAT)
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_RAW)
$(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_TARGET_MASQUERADE)
$(call KCONFIG_ENABLE_OPT,CONFIG_BRIDGE)
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_CORE)
$(call KCONFIG_ENABLE_OPT,CONFIG_VETH)
$(call KCONFIG_ENABLE_OPT,CONFIG_OVERLAY_FS)
$(call KCONFIG_ENABLE_OPT,CONFIG_KEYS)
$(DOCKER_ENGINE_DRIVER_BTRFS_LINUX_CONFIG_FIXUPS)
$(DOCKER_ENGINE_DRIVER_DM_LINUX_CONFIG_FIXUPS)
endef
$(eval $(golang-package))

View File

@@ -0,0 +1,4 @@
#!/bin/sh
"${@}" 2>&1 | while read -r LINE; do
logger -t "$(basename "${1}")" "$LINE";
done