diff options
| author | Anders Betts <anders.betts@gmail.com> | 2026-09-20 23:09:31 +0200 |
|---|---|---|
| committer | Anders Betts <anders.betts@gmail.com> | 2026-09-20 23:09:31 +0200 |
| commit | 19e4d8dcc9c9e76a8c90855cccb4c4553b35389e (patch) | |
| tree | d014fd0baebc2e269ee6e2f3def2c657aaee3659 /Dockerfile | |
| parent | fe40173f32b14e012044b39f0f63c2613787e725 (diff) | |
| download | bokf-19e4d8dcc9c9e76a8c90855cccb4c4553b35389e.tar.gz bokf-19e4d8dcc9c9e76a8c90855cccb4c4553b35389e.zip | |
deploy: cross-compile static aarch64 for the Alpine imagev0.1.54
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 \ |
