From 57f033be60463f54fdd4874dd2329002c9489061 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 31 Oct 2023 19:43:01 -0700 Subject: [PATCH] add targetos to build args --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 68b6158c..533113a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,7 @@ LABEL name="archivebox" \ documentation="https://github.com/ArchiveBox/ArchiveBox/wiki/Docker#docker" ARG TARGETPLATFORM +ARG TARGETOS ARG TARGETARCH ARG TARGETVARIANT @@ -70,6 +71,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-o", "errexit", "-o", "errtrace", "-o", " # Detect ArchiveBox version number by reading package.json COPY --chown=root:root --chmod=755 package.json "$CODE_DIR/" RUN grep '"version": ' "${CODE_DIR}/package.json" | awk -F'"' '{print $4}' > /VERSION.txt + +# Force apt to leave downloaded binaries in /var/cache/apt (massively speeds up Docker builds) RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache # Print debug info about build and save it to disk