Skip to content
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

buildmaster: add static apk utility #48

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docker/buildmaster/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
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=74de0e9bd73d1af8720df40aa68d472943909804

RUN git clone https://gitlab.alpinelinux.org/alpine/apk-tools.git /tmp/apk-tools
WORKDIR /tmp/apk-tools
RUN git checkout $APK_TOOLS_COMMIT
RUN make -j$(nproc) static


FROM debian:11
MAINTAINER OpenWrt Maintainers

Expand Down Expand Up @@ -55,6 +80,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 && \
Expand Down
4 changes: 4 additions & 0 deletions tests/cram/master/02-apk.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Check that apk is available and usable in master container:

$ docker run --entrypoint apk local/master | grep usage
usage: apk [<OPTIONS>...] COMMAND [<ARGUMENTS>...]