vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 2c6bd8c9dc67d3e0208e1873d8bf3fef6d8f9aa3
parent 9366e3145231034040d7d2e0216070163d6d889f
Author: Jeremy Lin <jjlin@users.noreply.github.com>
Date:   Sun, 22 Jan 2023 01:01:02 -0800

Rename `.buildx` Dockerfiles to `.buildkit`

This is a more accurate name, since these Dockerfiles require BuildKit, not Buildx.

Diffstat:
M.github/workflows/release.yml | 5++++-
Mdocker/Dockerfile.j2 | 2+-
Mdocker/Makefile | 4++--
Rdocker/amd64/Dockerfile.buildx -> docker/amd64/Dockerfile.buildkit | 0
Rdocker/amd64/Dockerfile.buildx.alpine -> docker/amd64/Dockerfile.buildkit.alpine | 0
Rdocker/arm64/Dockerfile.buildx -> docker/arm64/Dockerfile.buildkit | 0
Rdocker/arm64/Dockerfile.buildx.alpine -> docker/arm64/Dockerfile.buildkit.alpine | 0
Rdocker/armv6/Dockerfile.buildx -> docker/armv6/Dockerfile.buildkit | 0
Rdocker/armv6/Dockerfile.buildx.alpine -> docker/armv6/Dockerfile.buildkit.alpine | 0
Rdocker/armv7/Dockerfile.buildx -> docker/armv7/Dockerfile.buildkit | 0
Rdocker/armv7/Dockerfile.buildx.alpine -> docker/armv7/Dockerfile.buildkit.alpine | 0
Mhooks/build | 6+++---
12 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml @@ -48,7 +48,10 @@ jobs: ports: - 5000:5000 env: - DOCKER_BUILDKIT: 1 # Disabled for now, but we should look at this because it will speedup building! + # Use BuildKit (https://docs.docker.com/build/buildkit/) for better + # build performance and the ability to copy extended file attributes + # (e.g., for executable capabilities) across build phases. + DOCKER_BUILDKIT: 1 # DOCKER_REPO/secrets.DOCKERHUB_REPO needs to be 'index.docker.io/<user>/<repo>' DOCKER_REPO: ${{ secrets.DOCKERHUB_REPO }} SOURCE_COMMIT: ${{ github.sha }} diff --git a/docker/Dockerfile.j2 b/docker/Dockerfile.j2 @@ -50,7 +50,7 @@ {% else %} {% set package_arch_target_param = "" %} {% endif %} -{% if "buildx" in target_file %} +{% if "buildkit" in target_file %} {% set mount_rust_cache = "--mount=type=cache,target=/root/.cargo/git --mount=type=cache,target=/root/.cargo/registry " %} {% else %} {% set mount_rust_cache = "" %} diff --git a/docker/Makefile b/docker/Makefile @@ -8,8 +8,8 @@ all: $(OBJECTS) %/Dockerfile.alpine: Dockerfile.j2 render_template ./render_template "$<" "{\"target_file\":\"$@\"}" > "$@" -%/Dockerfile.buildx: Dockerfile.j2 render_template +%/Dockerfile.buildkit: Dockerfile.j2 render_template ./render_template "$<" "{\"target_file\":\"$@\"}" > "$@" -%/Dockerfile.buildx.alpine: Dockerfile.j2 render_template +%/Dockerfile.buildkit.alpine: Dockerfile.j2 render_template ./render_template "$<" "{\"target_file\":\"$@\"}" > "$@" diff --git a/docker/amd64/Dockerfile.buildx b/docker/amd64/Dockerfile.buildkit diff --git a/docker/amd64/Dockerfile.buildx.alpine b/docker/amd64/Dockerfile.buildkit.alpine diff --git a/docker/arm64/Dockerfile.buildx b/docker/arm64/Dockerfile.buildkit diff --git a/docker/arm64/Dockerfile.buildx.alpine b/docker/arm64/Dockerfile.buildkit.alpine diff --git a/docker/armv6/Dockerfile.buildx b/docker/armv6/Dockerfile.buildkit diff --git a/docker/armv6/Dockerfile.buildx.alpine b/docker/armv6/Dockerfile.buildkit.alpine diff --git a/docker/armv7/Dockerfile.buildx b/docker/armv7/Dockerfile.buildkit diff --git a/docker/armv7/Dockerfile.buildx.alpine b/docker/armv7/Dockerfile.buildkit.alpine diff --git a/hooks/build b/hooks/build @@ -34,9 +34,9 @@ for label in "${LABELS[@]}"; do LABEL_ARGS+=(--label "${label}") done -# Check if DOCKER_BUILDKIT is set, if so, use the Dockerfile.buildx as template +# Check if DOCKER_BUILDKIT is set, if so, use the Dockerfile.buildkit as template if [[ -n "${DOCKER_BUILDKIT}" ]]; then - buildx_suffix=.buildx + buildkit_suffix=.buildkit fi set -ex @@ -45,6 +45,6 @@ for arch in "${arches[@]}"; do docker build \ "${LABEL_ARGS[@]}" \ -t "${DOCKER_REPO}:${DOCKER_TAG}-${arch}" \ - -f docker/${arch}/Dockerfile${buildx_suffix}${distro_suffix} \ + -f docker/${arch}/Dockerfile${buildkit_suffix}${distro_suffix} \ . done