21 lines
942 B
Docker
21 lines
942 B
Docker
# syntax=docker/dockerfile:1
|
|
# Packages the binaries deploy/build.sh already built (dist/bin/linux_<arch>/bamboo),
|
|
# so the arm64 image needs no emulation. Build it with: sh deploy/build.sh && docker buildx build .
|
|
FROM --platform=$BUILDPLATFORM alpine:3.22 AS prep
|
|
RUN apk add --no-cache ca-certificates \
|
|
&& mkdir /data && chown 65532:65532 /data
|
|
|
|
FROM scratch
|
|
ARG TARGETARCH
|
|
LABEL org.opencontainers.image.title="Bamboo" \
|
|
org.opencontainers.image.description="Site agent: connects a private network to the edge over WireGuard" \
|
|
org.opencontainers.image.source="https://git.veillax.com/Veillax/bamboo" \
|
|
org.opencontainers.image.licenses="AGPL-3.0-only"
|
|
COPY --from=prep /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
COPY --from=prep --chown=65532:65532 /data /data
|
|
COPY dist/bin/linux_${TARGETARCH}/bamboo /bamboo
|
|
USER 65532:65532
|
|
ENV BAMBOO_DATA=/data
|
|
VOLUME ["/data"]
|
|
ENTRYPOINT ["/bamboo"]
|