diff --git a/docker/buildmaster/Dockerfile b/docker/buildmaster/Dockerfile index 8d21245..908149d 100644 --- a/docker/buildmaster/Dockerfile +++ b/docker/buildmaster/Dockerfile @@ -1,3 +1,29 @@ +FROM alpinelinux/build-base:latest-x86_64 AS apk-builder + +RUN abuild-apk add -u \ + gcc \ + git \ + linux-headers \ + lua5.3-dev \ + lua5.3-lzlib \ + make \ + musl-dev \ + openssl-dev \ + openssl-libs-static \ + zlib-dev \ + zlib-static \ + zstd-dev \ + zstd-static + +ARG APK_TOOLS_COMMIT=54caa31be633efc5f655700b77af290124f71689 + +RUN git clone https://gitlab.alpinelinux.org/alpine/apk-tools.git /tmp/apk-tools +WORKDIR /tmp/apk-tools +RUN git fetch --depth=1 origin $APK_TOOLS_COMMIT +RUN git reset --hard $APK_TOOLS_COMMIT +RUN make -j$(nproc) static + + FROM debian:11 MAINTAINER OpenWrt Maintainers @@ -55,6 +81,7 @@ COPY docker/buildmaster/files/start.sh /start.sh COPY phase1 /phase1 COPY phase2 /phase2 COPY scripts /scripts +COPY --from=apk-builder /tmp/apk-tools/src/apk.static /usr/bin/apk RUN \ groupadd buildbot && \ diff --git a/tests/cram/master/02-apk.t b/tests/cram/master/02-apk.t new file mode 100644 index 0000000..8375faf --- /dev/null +++ b/tests/cram/master/02-apk.t @@ -0,0 +1,4 @@ +Check that apk is available and usable in master container: + + $ docker run local/master apk | grep usage + usage: apk [...] COMMAND [...]