diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 21103cb75..cc8026c4c 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -16,40 +16,35 @@ COPY kernel/$ARCH/kernel-source-info /etc/ ADD kernel/$ARCH/kernel-patches.tar /etc/kernel-patches ADD kernel/$ARCH/kernel-modules.tar / -COPY packages/proxy/proxy /usr/bin/slirp-proxy -COPY packages/proxy/proxy /sbin/proxy-vsockd +COPY packages/proxy/usr /usr/ +COPY packages/proxy/sbin /sbin/ COPY packages/proxy/etc /etc/ -COPY packages/transfused/transfused /sbin/ +COPY packages/transfused/sbin /sbin/ COPY packages/transfused/etc /etc/ -COPY packages/tap-vsockd/tap-vsockd /sbin/ +COPY packages/tap-vsockd/sbin /sbin/ COPY packages/tap-vsockd/etc /etc/ -COPY packages/docker/bin/* /usr/bin/ +COPY packages/docker/usr /usr/ COPY packages/docker/etc /etc/ -COPY packages/diagnostics/diagnostics /usr/bin/ -COPY packages/diagnostics/diagnostics-server /usr/bin/ +COPY packages/diagnostics/usr /usr/ COPY packages/diagnostics/etc /etc/ COPY packages/automount/etc /etc/ COPY packages/binfmt_misc/etc /etc/ COPY packages/hostsettings/etc /etc/ -COPY packages/hvtools/hv_kvp_daemon /sbin/ -COPY packages/hvtools/hv_vss_daemon /sbin/ +COPY packages/hvtools/sbin /sbin/ COPY packages/hvtools/etc /etc/ -COPY packages/hvtools/hv_get_dhcp_info /sbin/ -COPY packages/hvtools/hv_get_dns_info /sbin/ -COPY packages/hvtools/hv_set_ifconfig /sbin/ -COPY packages/hvtools/hvtools.tar.gz /usr/share/src/ +COPY packages/hvtools/usr /usr/ COPY packages/chronyd/etc /etc/ COPY packages/userns/etc /etc/ -#COPY packages/nc-vsock/nc-vsock /usr/bin/ -COPY packages/vsudd/vsudd /sbin/ +COPY packages/nc-vsock/usr /usr/ +COPY packages/vsudd/sbin /sbin/ COPY packages/vsudd/etc /etc/ -COPY packages/mobyconfig/mobyconfig /usr/bin/ -COPY packages/mobyplatform/mobyplatform /usr/bin/ +COPY packages/mobyconfig/usr /usr/ +COPY packages/mobyplatform/usr /usr/ COPY packages/oom/etc /etc/ -COPY packages/9pmount-vsock/9pmount-vsock /sbin/ +COPY packages/9pmount-vsock/sbin /sbin/ COPY packages/test/etc /etc/ -COPY packages/test/mobytest /usr/bin/ -COPY packages/iptables/iptables /usr/local/sbin/ +COPY packages/test/usr /usr/ +COPY packages/iptables/usr /usr/ COPY packages/containerd/etc /etc/ COPY packages/aws/etc /etc/ COPY packages/azure/etc /etc/ diff --git a/alpine/packages/9pmount-vsock/.gitignore b/alpine/packages/9pmount-vsock/.gitignore index 96331e6d1..5b42612bc 100644 --- a/alpine/packages/9pmount-vsock/.gitignore +++ b/alpine/packages/9pmount-vsock/.gitignore @@ -1 +1 @@ -9pmount-vsock +sbin/ diff --git a/alpine/packages/9pmount-vsock/Makefile b/alpine/packages/9pmount-vsock/Makefile index 595a82e92..7d9d06b35 100644 --- a/alpine/packages/9pmount-vsock/Makefile +++ b/alpine/packages/9pmount-vsock/Makefile @@ -1,8 +1,9 @@ DEPS=Dockerfile $(wildcard *.c *.h) 9pmount-vsock: $(DEPS) + mkdir -p sbin tar cf - $(DEPS) | docker build -t 9pmount-vsock:build - - docker run --rm --net=none 9pmount-vsock:build | tar xf - + docker run --rm --net=none 9pmount-vsock:build | tar xf - -C sbin clean: - rm -f 9pmount-vsock + rm -rf sbin diff --git a/alpine/packages/diagnostics/Makefile b/alpine/packages/diagnostics/Makefile index 0175bf55e..f2d5d6749 100644 --- a/alpine/packages/diagnostics/Makefile +++ b/alpine/packages/diagnostics/Makefile @@ -1,15 +1,15 @@ -all: diagnostics-server +all: usr/bin/diagnostics-server files: ls Dockerfile *.go > files printf -- '-C\n..\n' >> files (cd .. && find vendor) >> files -diagnostics-server: Dockerfile $(wildcard *.go) ../vendor/manifest files +usr/bin/diagnostics-server: Dockerfile $(wildcard *.go) ../vendor/manifest files tar cf - -T files | docker build -t diagnostics-server:build - - docker run --rm --net=none diagnostics-server:build | tar xf - + docker run --rm --net=none diagnostics-server:build | tar xf - -C usr/bin clean: - rm -rf diagnostics-server files + rm -f usr/bin/diagnostics-server files .DELETE_ON_ERROR: diff --git a/alpine/packages/diagnostics/diagnostics b/alpine/packages/diagnostics/usr/bin/diagnostics similarity index 100% rename from alpine/packages/diagnostics/diagnostics rename to alpine/packages/diagnostics/usr/bin/diagnostics diff --git a/alpine/packages/docker/.gitignore b/alpine/packages/docker/.gitignore index e660fd93d..1b91047ac 100644 --- a/alpine/packages/docker/.gitignore +++ b/alpine/packages/docker/.gitignore @@ -1 +1 @@ -bin/ +usr/ diff --git a/alpine/packages/docker/Makefile b/alpine/packages/docker/Makefile index e9d279d6a..fe2ec2903 100644 --- a/alpine/packages/docker/Makefile +++ b/alpine/packages/docker/Makefile @@ -3,14 +3,14 @@ ARCH?=x86_64 OS?=Linux DOCKER_EXPERIMENTAL?=1 -all: bin/docker +all: usr/bin/docker TEST_HOST=$(shell if echo "$(DOCKER_VERSION)" | grep -q -- '-rc'; then echo "test.docker.com"; else echo "get.docker.com"; fi) DOCKER_HOST?=$(shell [ "${DOCKER_EXPERIMENTAL}" -eq 1 ] && printf "experimental.docker.com" || printf "${TEST_HOST}") DOCKER_BIN_URL?="https://${DOCKER_HOST}/builds/${OS}/${ARCH}/docker-${DOCKER_VERSION}.tgz" -bin/docker: - mkdir -p bin +usr/bin/docker: + mkdir -p usr/bin curl -sSL ${DOCKER_BIN_URL} | tar xzf - && \ mv docker/docker-containerd-ctr \ docker/docker \ @@ -19,9 +19,9 @@ bin/docker: docker/docker-proxy \ docker/docker-runc \ docker/docker-containerd-shim \ - bin/ + usr/bin/ clean: - rm -rf bin/ docker/ + rm -rf usr/ docker/ .DELETE_ON_ERROR: diff --git a/alpine/packages/hvtools/.gitignore b/alpine/packages/hvtools/.gitignore index c69db8318..cf40cde3b 100644 --- a/alpine/packages/hvtools/.gitignore +++ b/alpine/packages/hvtools/.gitignore @@ -1,4 +1,2 @@ -/hv_fcopy_daemon -/hv_kvp_daemon -/hv_vss_daemon -/hvtools.tar.gz +sbin/ +usr/ diff --git a/alpine/packages/hvtools/Makefile b/alpine/packages/hvtools/Makefile index 67efe1d72..936858ccb 100644 --- a/alpine/packages/hvtools/Makefile +++ b/alpine/packages/hvtools/Makefile @@ -1,13 +1,14 @@ -all: hv_fcopy_daemon hvtools.tar.gz +all: sbin/hv_fcopy_daemon usr/share/src/hvtools.tar.gz -hv_fcopy_daemon: Dockerfile src/* +sbin/hv_fcopy_daemon: Dockerfile src/* tar cf - Dockerfile src | docker build -t hvtools:build - - docker run --rm --net=none hvtools:build | tar xf - + docker run --rm --net=none hvtools:build | tar xf - -C sbin -hvtools.tar.gz: src/* - tar czf hvtools.tar.gz src +usr/share/src/hvtools.tar.gz: src/* + mkdir -p usr/share/src/ + tar czf usr/share/src/hvtools.tar.gz src clean: - rm -f hv_fcopy_daemon hv_kvp_daemon hv_vss_daemon hvtools.tar.gz + rm -rf usr sbin/hv_fcopy_daemon sbin/hv_kvp_daemon sbin/hv_vss_daemon .DELETE_ON_ERROR: diff --git a/alpine/packages/hvtools/hv_get_dhcp_info b/alpine/packages/hvtools/sbin/hv_get_dhcp_info similarity index 100% rename from alpine/packages/hvtools/hv_get_dhcp_info rename to alpine/packages/hvtools/sbin/hv_get_dhcp_info diff --git a/alpine/packages/hvtools/hv_get_dns_info b/alpine/packages/hvtools/sbin/hv_get_dns_info similarity index 100% rename from alpine/packages/hvtools/hv_get_dns_info rename to alpine/packages/hvtools/sbin/hv_get_dns_info diff --git a/alpine/packages/hvtools/hv_set_ifconfig b/alpine/packages/hvtools/sbin/hv_set_ifconfig similarity index 100% rename from alpine/packages/hvtools/hv_set_ifconfig rename to alpine/packages/hvtools/sbin/hv_set_ifconfig diff --git a/alpine/packages/iptables/Makefile b/alpine/packages/iptables/Makefile index df248cc0a..607050e5c 100644 --- a/alpine/packages/iptables/Makefile +++ b/alpine/packages/iptables/Makefile @@ -1,9 +1,11 @@ -all: iptables +all: usr/local/sbin/iptables -iptables: Dockerfile main.ml +usr/local/sbin/iptables: Dockerfile main.ml + mkdir -p usr/local/sbin docker build -t iptables:build . - docker run --rm iptables:build cat /app/iptables > iptables - chmod 755 iptables + docker run --rm iptables:build cat /app/iptables > usr/local/sbin/iptables + chmod 755 usr/local/sbin/iptables clean: + rm -rf usr docker images -q iptables:build | xargs docker rmi -f || true diff --git a/alpine/packages/mobyconfig/mobyconfig b/alpine/packages/mobyconfig/usr/bin/mobyconfig similarity index 100% rename from alpine/packages/mobyconfig/mobyconfig rename to alpine/packages/mobyconfig/usr/bin/mobyconfig diff --git a/alpine/packages/mobyplatform/mobyplatform b/alpine/packages/mobyplatform/usr/bin/mobyplatform similarity index 100% rename from alpine/packages/mobyplatform/mobyplatform rename to alpine/packages/mobyplatform/usr/bin/mobyplatform diff --git a/alpine/packages/nc-vsock/.gitignore b/alpine/packages/nc-vsock/.gitignore index 41edd196d..1b91047ac 100644 --- a/alpine/packages/nc-vsock/.gitignore +++ b/alpine/packages/nc-vsock/.gitignore @@ -1 +1 @@ -nc-vsock +usr/ diff --git a/alpine/packages/nc-vsock/Makefile b/alpine/packages/nc-vsock/Makefile index 0bc2d2d1b..cf9752ee6 100644 --- a/alpine/packages/nc-vsock/Makefile +++ b/alpine/packages/nc-vsock/Makefile @@ -1,8 +1,9 @@ DEPS=Dockerfile $(wildcard *.c *.h) -nc-vsock: $(DEPS) +usr/bin/nc-vsock: $(DEPS) + mkdir -p usr/bin tar cf - $(DEPS) | docker build -t nc-vsock:build - - docker run --rm --net=none nc-vsock:build | tar xf - + docker run --rm --net=none nc-vsock:build | tar xf - -C usr/bin clean: - rm -f nc-vsock + rm -rf usr diff --git a/alpine/packages/proxy/.gitignore b/alpine/packages/proxy/.gitignore index 20e175582..943135763 100644 --- a/alpine/packages/proxy/.gitignore +++ b/alpine/packages/proxy/.gitignore @@ -1,2 +1,4 @@ proxy files +usr/ +sbin/ diff --git a/alpine/packages/proxy/Makefile b/alpine/packages/proxy/Makefile index df1f82903..c676cd4ee 100644 --- a/alpine/packages/proxy/Makefile +++ b/alpine/packages/proxy/Makefile @@ -1,4 +1,4 @@ -all: proxy +all: usr/bin/slirp-proxy sbin/proxy-vsockd files: ls Dockerfile *.go > files @@ -10,7 +10,15 @@ proxy: Dockerfile $(wildcard *.go libproxy/*.go) ../vendor/manifest files tar cf - -T files | docker build -t proxy:build - docker run --rm --net=none proxy:build | tar xf - +usr/bin/slirp-proxy: proxy + mkdir -p usr/bin + cp proxy $@ + +sbin/proxy-vsockd: proxy + mkdir -p sbin + cp proxy $@ + clean: - rm -rf proxy files + rm -rf proxy files sbin usr .DELETE_ON_ERROR: diff --git a/alpine/packages/tap-vsockd/.gitignore b/alpine/packages/tap-vsockd/.gitignore index 5cf0d45b4..e1ae85e07 100644 --- a/alpine/packages/tap-vsockd/.gitignore +++ b/alpine/packages/tap-vsockd/.gitignore @@ -1 +1 @@ -tap-vsockd +sbin diff --git a/alpine/packages/tap-vsockd/Makefile b/alpine/packages/tap-vsockd/Makefile index 5b330c4f6..9fb44a613 100644 --- a/alpine/packages/tap-vsockd/Makefile +++ b/alpine/packages/tap-vsockd/Makefile @@ -1,8 +1,9 @@ DEPS=Dockerfile $(wildcard *.c *.h) -tap-vsockd: $(DEPS) +sbin/tap-vsockd: $(DEPS) + mkdir -p sbin tar cf - $(DEPS) | docker build -t tap-vsockd:build - - docker run --rm --net=none tap-vsockd:build | tar xf - + docker run --rm --net=none tap-vsockd:build | tar xf - -C sbin clean: - rm -f tap-vsockd + rm -rf sbin diff --git a/alpine/packages/test/mobytest b/alpine/packages/test/usr/bin/mobytest similarity index 100% rename from alpine/packages/test/mobytest rename to alpine/packages/test/usr/bin/mobytest diff --git a/alpine/packages/transfused/.gitignore b/alpine/packages/transfused/.gitignore index 497a34c5f..e1ae85e07 100644 --- a/alpine/packages/transfused/.gitignore +++ b/alpine/packages/transfused/.gitignore @@ -1 +1 @@ -/transfused +sbin diff --git a/alpine/packages/transfused/Makefile b/alpine/packages/transfused/Makefile index 34e1e57f0..804d30f80 100644 --- a/alpine/packages/transfused/Makefile +++ b/alpine/packages/transfused/Makefile @@ -1,8 +1,9 @@ DEPS=Dockerfile $(wildcard *.c *.h) -transfused: $(DEPS) +sbin/transfused: $(DEPS) + mkdir -p sbin tar cf - $(DEPS) | docker build -t transfused:build - - docker run --rm --net=none transfused:build | tar xf - + docker run --rm --net=none transfused:build | tar xf - -C sbin clean: - rm -f transfused + rm -rf sbin diff --git a/alpine/packages/vsudd/.gitignore b/alpine/packages/vsudd/.gitignore index 03530f774..e7258a57d 100644 --- a/alpine/packages/vsudd/.gitignore +++ b/alpine/packages/vsudd/.gitignore @@ -1,2 +1,2 @@ -vsudd files +sbin/ diff --git a/alpine/packages/vsudd/Makefile b/alpine/packages/vsudd/Makefile index 2313c1cf2..66cd1389d 100644 --- a/alpine/packages/vsudd/Makefile +++ b/alpine/packages/vsudd/Makefile @@ -6,10 +6,11 @@ files: (cd .. && find vendor) >> files vsudd: Dockerfile $(wildcard *.go) ../vendor/manifest files + mkdir -p sbin tar cf - -T files | docker build -t vsudd:build - - docker run --rm --net=none vsudd:build | tar xf - + docker run --rm --net=none vsudd:build | tar xf - -C sbin clean: - rm -rf vsudd files + rm -rf sbin files .DELETE_ON_ERROR: