bbk-docker/Dockerfile

36 lines
1.1 KiB
Docker
Raw Normal View History

2022-07-08 22:11:57 +02:00
ARG BBKCLI_VERSION=1.0
FROM --platform=${TARGETPLATFORM} alpine:3.16 AS bbkcli
2022-07-08 22:11:57 +02:00
# See: http://www.bredbandskollen.se/bredbandskollen-cli/
ARG BBKCLI_VERSION
ARG TARGETPLATFORM
RUN case ${TARGETPLATFORM} in \
"linux/amd64") BBKCLI_ARCH=amd64 ;; \
"linux/arm64") BBKCLI_ARCH=aarch64 ;; \
"linux/arm/v7") BBKCLI_ARCH=armhf ;; \
"linux/386") BBKCLI_ARCH=i386 ;; \
esac \
&& wget -q https://frontend.bredbandskollen.se/download/bbk_cli_linux_${BBKCLI_ARCH:-amd64}-${BBKCLI_VERSION} -O /bbk_cli
2022-07-08 22:11:57 +02:00
# Main image
FROM --platform=${TARGETPLATFORM} alpine:3.16
2022-07-08 22:11:57 +02:00
LABEL net.northern-lights.image.authors="aleksandar@puharic.com"
LABEL net.northern-lights.image.version="${BBKCLI_VERSION}"
LABEL net.northern-lights.image.licenses="GPL-2.0+"
RUN apk add --update --no-cache gcompat libstdc++ tzdata \
&& ln -sf /usr/local/bin/bbk_cli /usr/local/bin/bbk
COPY --from=bbkcli --chmod=0775 ["/bbk_cli", "/usr/local/bin/"]
ARG BBKCLI_VERSION
ARG TARGETPLATFORM
2022-07-08 22:11:57 +02:00
ENV BBKCLI_VERSION=${BBKCLI_VERSION}
ENV PLATFORM_ARCH=${TARGETPLATFORM}
2022-07-08 22:11:57 +02:00
ENV TZ=Europe/Stockholm
2022-07-09 15:31:57 +02:00
ENTRYPOINT [ "/usr/local/bin/bbk_cli" ]