diff options
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -7,14 +7,23 @@ RUN apk add --no-cache build-base openssl-dev WORKDIR /src COPY . . ARG VERSION=0.1.0-dev -RUN make -j"$(nproc)" backend VERSION="$VERSION" \ - && make test-core VERSION="$VERSION" \ +# With .prebuilt/ the static aarch64 binaries are cross-compiled on the +# development machine (deploy/Dockerfile.cross); otherwise build and test from +# source on this host. +RUN if [ -x .prebuilt/bokfd ]; then \ + mkdir -p build && \ + cp .prebuilt/bokfd .prebuilt/bokfctl build/; \ + else \ + make -j"$(nproc)" backend VERSION="$VERSION" \ + && make test-core VERSION="$VERSION"; \ + fi \ && strip build/bokfd build/bokfctl -# The runtime image carries the daemon and bokfctl only. The ncurses TUI is a -# frontend: build it from source on the machine you sit at. +# The runtime image carries the daemon and bokfctl only, statically linked +# against OpenSSL and the C library; the ncurses TUI is a frontend built on the +# machine you sit at. FROM alpine:3.24 AS runtime -RUN apk add --no-cache libssl3 ca-certificates util-linux \ +RUN apk add --no-cache ca-certificates util-linux \ && addgroup -S bokfd \ && adduser -S -D -H -u 10001 -G bokfd -s /sbin/nologin bokfd \ && install -d -o bokfd -g bokfd /var/lib/bokfd /var/lib/bokfd/backup \ |
