Skip to content

Commit 5725d29

Browse files
authoredMar 24, 2023
Merge pull request #3363 from BlackDex/gha-test
Add support for Quay.io and GHCR.io as registries
2 parents a428f05 + 467ecfd commit 5725d29

25 files changed

+175
-55
lines changed
 

‎.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
steps:
4444
# Checkout the repo
4545
- name: "Checkout"
46-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
46+
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
4747
# End Checkout the repo
4848

4949

@@ -71,7 +71,7 @@ jobs:
7171

7272
# Only install the clippy and rustfmt components on the default rust-toolchain
7373
- name: "Install rust-toolchain version"
74-
uses: dtolnay/rust-toolchain@e12eda571dc9a5ee5d58eecf4738ec291c66f295 # master @ 2023-02-19 - 02:23 GMT+1
74+
uses: dtolnay/rust-toolchain@fc3253060d0c959bea12a59f10f8391454a0b02d # master @ 2023-03-21 - 06:36 GMT+1
7575
if: ${{ matrix.channel == 'rust-toolchain' }}
7676
with:
7777
toolchain: "${{steps.toolchain.outputs.RUST_TOOLCHAIN}}"
@@ -81,7 +81,7 @@ jobs:
8181

8282
# Install the any other channel to be used for which we do not execute clippy and rustfmt
8383
- name: "Install MSRV version"
84-
uses: dtolnay/rust-toolchain@e12eda571dc9a5ee5d58eecf4738ec291c66f295 # master @ 2023-02-19 - 02:23 GMT+1
84+
uses: dtolnay/rust-toolchain@fc3253060d0c959bea12a59f10f8391454a0b02d # master @ 2023-03-21 - 06:36 GMT+1
8585
if: ${{ matrix.channel != 'rust-toolchain' }}
8686
with:
8787
toolchain: "${{steps.toolchain.outputs.RUST_TOOLCHAIN}}"

‎.github/workflows/hadolint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
# Checkout the repo
1515
- name: Checkout
16-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
16+
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
1717
# End Checkout the repo
1818

1919

‎.github/workflows/release.yml

+132-18
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,19 @@ jobs:
5252
# build performance and the ability to copy extended file attributes
5353
# (e.g., for executable capabilities) across build phases.
5454
DOCKER_BUILDKIT: 1
55-
# DOCKER_REPO/secrets.DOCKERHUB_REPO needs to be 'index.docker.io/<user>/<repo>'
56-
DOCKER_REPO: ${{ secrets.DOCKERHUB_REPO }}
5755
SOURCE_COMMIT: ${{ github.sha }}
5856
SOURCE_REPOSITORY_URL: "https://github.com/${{ github.repository }}"
57+
# The *_REPO variables need to be configured as repository variables
58+
# Append `/settings/variables/actions` to your repo url
59+
# DOCKERHUB_REPO needs to be 'index.docker.io/<user>/<repo>'
60+
# Check for Docker hub credentials in secrets
61+
HAVE_DOCKERHUB_LOGIN: ${{ vars.DOCKERHUB_REPO != '' && secrets.DOCKERHUB_USERNAME != '' && secrets.DOCKERHUB_TOKEN != '' }}
62+
# GHCR_REPO needs to be 'ghcr.io/<user>/<repo>'
63+
# Check for Github credentials in secrets
64+
HAVE_GHCR_LOGIN: ${{ vars.GHCR_REPO != '' && github.repository_owner != '' && secrets.GITHUB_TOKEN != '' }}
65+
# QUAY_REPO needs to be 'quay.io/<user>/<repo>'
66+
# Check for Quay.io credentials in secrets
67+
HAVE_QUAY_LOGIN: ${{ vars.QUAY_REPO != '' && secrets.QUAY_USERNAME != '' && secrets.QUAY_TOKEN != '' }}
5968
if: ${{ needs.skip_check.outputs.should_skip != 'true' && github.repository == 'dani-garcia/vaultwarden' }}
6069
strategy:
6170
matrix:
@@ -64,17 +73,10 @@ jobs:
6473
steps:
6574
# Checkout the repo
6675
- name: Checkout
67-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
76+
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
6877
with:
6978
fetch-depth: 0
7079

71-
# Login to Docker Hub
72-
- name: Login to Docker Hub
73-
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
74-
with:
75-
username: ${{ secrets.DOCKERHUB_USERNAME }}
76-
password: ${{ secrets.DOCKERHUB_TOKEN }}
77-
7880
# Determine Docker Tag
7981
- name: Init Variables
8082
id: vars
@@ -88,34 +90,146 @@ jobs:
8890
fi
8991
# End Determine Docker Tag
9092

91-
- name: Build Debian based images
93+
# Login to Docker Hub
94+
- name: Login to Docker Hub
95+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
96+
with:
97+
username: ${{ secrets.DOCKERHUB_USERNAME }}
98+
password: ${{ secrets.DOCKERHUB_TOKEN }}
99+
if: ${{ env.HAVE_DOCKERHUB_LOGIN == 'true' }}
100+
101+
# Login to GitHub Container Registry
102+
- name: Login to GitHub Container Registry
103+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
104+
with:
105+
registry: ghcr.io
106+
username: ${{ github.repository_owner }}
107+
password: ${{ secrets.GITHUB_TOKEN }}
108+
if: ${{ env.HAVE_GHCR_LOGIN == 'true' }}
109+
110+
# Login to Quay.io
111+
- name: Login to Quay.io
112+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
113+
with:
114+
registry: quay.io
115+
username: ${{ secrets.QUAY_USERNAME }}
116+
password: ${{ secrets.QUAY_TOKEN }}
117+
if: ${{ env.HAVE_QUAY_LOGIN == 'true' }}
118+
119+
# Debian
120+
121+
# Docker Hub
122+
- name: Build Debian based images (docker.io)
123+
shell: bash
124+
env:
125+
DOCKER_REPO: "${{ vars.DOCKERHUB_REPO }}"
126+
DOCKER_TAG: "${{steps.vars.outputs.DOCKER_TAG}}"
127+
run: |
128+
./hooks/build
129+
if: ${{ matrix.base_image == 'debian' && env.HAVE_DOCKERHUB_LOGIN == 'true' }}
130+
131+
- name: Push Debian based images (docker.io)
132+
shell: bash
133+
env:
134+
DOCKER_REPO: "${{ vars.DOCKERHUB_REPO }}"
135+
DOCKER_TAG: "${{steps.vars.outputs.DOCKER_TAG}}"
136+
run: |
137+
./hooks/push
138+
if: ${{ matrix.base_image == 'debian' && env.HAVE_DOCKERHUB_LOGIN == 'true' }}
139+
140+
# GitHub Container Registry
141+
- name: Build Debian based images (ghcr.io)
142+
shell: bash
143+
env:
144+
DOCKER_REPO: "${{ vars.GHCR_REPO }}"
145+
DOCKER_TAG: "${{steps.vars.outputs.DOCKER_TAG}}"
146+
run: |
147+
./hooks/build
148+
if: ${{ matrix.base_image == 'debian' && env.HAVE_GHCR_LOGIN == 'true' }}
149+
150+
- name: Push Debian based images (ghcr.io)
151+
shell: bash
152+
env:
153+
DOCKER_REPO: "${{ vars.GHCR_REPO }}"
154+
DOCKER_TAG: "${{steps.vars.outputs.DOCKER_TAG}}"
155+
run: |
156+
./hooks/push
157+
if: ${{ matrix.base_image == 'debian' && env.HAVE_GHCR_LOGIN == 'true' }}
158+
159+
# Quay.io
160+
- name: Build Debian based images (quay.io)
92161
shell: bash
93162
env:
163+
DOCKER_REPO: "${{ vars.QUAY_REPO }}"
94164
DOCKER_TAG: "${{steps.vars.outputs.DOCKER_TAG}}"
95165
run: |
96166
./hooks/build
97-
if: ${{ matrix.base_image == 'debian' }}
167+
if: ${{ matrix.base_image == 'debian' && env.HAVE_QUAY_LOGIN == 'true' }}
98168

99-
- name: Push Debian based images
169+
- name: Push Debian based images (quay.io)
100170
shell: bash
101171
env:
172+
DOCKER_REPO: "${{ vars.QUAY_REPO }}"
102173
DOCKER_TAG: "${{steps.vars.outputs.DOCKER_TAG}}"
103174
run: |
104175
./hooks/push
105-
if: ${{ matrix.base_image == 'debian' }}
176+
if: ${{ matrix.base_image == 'debian' && env.HAVE_QUAY_LOGIN == 'true' }}
177+
178+
# Alpine
179+
180+
# Docker Hub
181+
- name: Build Alpine based images (docker.io)
182+
shell: bash
183+
env:
184+
DOCKER_REPO: "${{ vars.DOCKERHUB_REPO }}"
185+
DOCKER_TAG: "${{steps.vars.outputs.DOCKER_TAG}}-alpine"
186+
run: |
187+
./hooks/build
188+
if: ${{ matrix.base_image == 'alpine' && env.HAVE_DOCKERHUB_LOGIN == 'true' }}
189+
190+
- name: Push Alpine based images (docker.io)
191+
shell: bash
192+
env:
193+
DOCKER_REPO: "${{ vars.DOCKERHUB_REPO }}"
194+
DOCKER_TAG: "${{steps.vars.outputs.DOCKER_TAG}}-alpine"
195+
run: |
196+
./hooks/push
197+
if: ${{ matrix.base_image == 'alpine' && env.HAVE_DOCKERHUB_LOGIN == 'true' }}
198+
199+
# GitHub Container Registry
200+
- name: Build Alpine based images (ghcr.io)
201+
shell: bash
202+
env:
203+
DOCKER_REPO: "${{ vars.GHCR_REPO }}"
204+
DOCKER_TAG: "${{steps.vars.outputs.DOCKER_TAG}}-alpine"
205+
run: |
206+
./hooks/build
207+
if: ${{ matrix.base_image == 'alpine' && env.HAVE_GHCR_LOGIN == 'true' }}
208+
209+
- name: Push Alpine based images (ghcr.io)
210+
shell: bash
211+
env:
212+
DOCKER_REPO: "${{ vars.GHCR_REPO }}"
213+
DOCKER_TAG: "${{steps.vars.outputs.DOCKER_TAG}}-alpine"
214+
run: |
215+
./hooks/push
216+
if: ${{ matrix.base_image == 'alpine' && env.HAVE_GHCR_LOGIN == 'true' }}
106217

107-
- name: Build Alpine based images
218+
# Quay.io
219+
- name: Build Alpine based images (quay.io)
108220
shell: bash
109221
env:
222+
DOCKER_REPO: "${{ vars.QUAY_REPO }}"
110223
DOCKER_TAG: "${{steps.vars.outputs.DOCKER_TAG}}-alpine"
111224
run: |
112225
./hooks/build
113-
if: ${{ matrix.base_image == 'alpine' }}
226+
if: ${{ matrix.base_image == 'alpine' && env.HAVE_QUAY_LOGIN == 'true' }}
114227

115-
- name: Push Alpine based images
228+
- name: Push Alpine based images (quay.io)
116229
shell: bash
117230
env:
231+
DOCKER_REPO: "${{ vars.QUAY_REPO }}"
118232
DOCKER_TAG: "${{steps.vars.outputs.DOCKER_TAG}}-alpine"
119233
run: |
120234
./hooks/push
121-
if: ${{ matrix.base_image == 'alpine' }}
235+
if: ${{ matrix.base_image == 'alpine' && env.HAVE_QUAY_LOGIN == 'true' }}

‎docker/Dockerfile.j2

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
# This file was generated using a Jinja2 template.
44
# Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfiles.
55

6-
{% set build_stage_base_image = "rust:1.67.1-bullseye" %}
6+
{% set build_stage_base_image = "rust:1.68.1-bullseye" %}
77
{% if "alpine" in target_file %}
88
{% if "amd64" in target_file %}
9-
{% set build_stage_base_image = "blackdex/rust-musl:x86_64-musl-stable-1.67.1" %}
9+
{% set build_stage_base_image = "blackdex/rust-musl:x86_64-musl-stable-1.68.1" %}
1010
{% set runtime_stage_base_image = "alpine:3.17" %}
1111
{% set package_arch_target = "x86_64-unknown-linux-musl" %}
1212
{% elif "armv7" in target_file %}
13-
{% set build_stage_base_image = "blackdex/rust-musl:armv7-musleabihf-stable-1.67.1" %}
13+
{% set build_stage_base_image = "blackdex/rust-musl:armv7-musleabihf-stable-1.68.1" %}
1414
{% set runtime_stage_base_image = "balenalib/armv7hf-alpine:3.17" %}
1515
{% set package_arch_target = "armv7-unknown-linux-musleabihf" %}
1616
{% elif "armv6" in target_file %}
17-
{% set build_stage_base_image = "blackdex/rust-musl:arm-musleabi-stable-1.67.1" %}
17+
{% set build_stage_base_image = "blackdex/rust-musl:arm-musleabi-stable-1.68.1" %}
1818
{% set runtime_stage_base_image = "balenalib/rpi-alpine:3.17" %}
1919
{% set package_arch_target = "arm-unknown-linux-musleabi" %}
2020
{% elif "arm64" in target_file %}
21-
{% set build_stage_base_image = "blackdex/rust-musl:aarch64-musl-stable-1.67.1" %}
21+
{% set build_stage_base_image = "blackdex/rust-musl:aarch64-musl-stable-1.68.1" %}
2222
{% set runtime_stage_base_image = "balenalib/aarch64-alpine:3.17" %}
2323
{% set package_arch_target = "aarch64-unknown-linux-musl" %}
2424
{% endif %}

‎docker/amd64/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM rust:1.67.1-bullseye as build
30+
FROM rust:1.68.1-bullseye as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/amd64/Dockerfile.alpine

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM blackdex/rust-musl:x86_64-musl-stable-1.67.1 as build
30+
FROM blackdex/rust-musl:x86_64-musl-stable-1.68.1 as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/amd64/Dockerfile.buildkit

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM rust:1.67.1-bullseye as build
30+
FROM rust:1.68.1-bullseye as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/amd64/Dockerfile.buildkit.alpine

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM blackdex/rust-musl:x86_64-musl-stable-1.67.1 as build
30+
FROM blackdex/rust-musl:x86_64-musl-stable-1.68.1 as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/arm64/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM rust:1.67.1-bullseye as build
30+
FROM rust:1.68.1-bullseye as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/arm64/Dockerfile.alpine

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM blackdex/rust-musl:aarch64-musl-stable-1.67.1 as build
30+
FROM blackdex/rust-musl:aarch64-musl-stable-1.68.1 as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/arm64/Dockerfile.buildkit

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM rust:1.67.1-bullseye as build
30+
FROM rust:1.68.1-bullseye as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/arm64/Dockerfile.buildkit.alpine

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM blackdex/rust-musl:aarch64-musl-stable-1.67.1 as build
30+
FROM blackdex/rust-musl:aarch64-musl-stable-1.68.1 as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/armv6/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM rust:1.67.1-bullseye as build
30+
FROM rust:1.68.1-bullseye as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/armv6/Dockerfile.alpine

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM blackdex/rust-musl:arm-musleabi-stable-1.67.1 as build
30+
FROM blackdex/rust-musl:arm-musleabi-stable-1.68.1 as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/armv6/Dockerfile.buildkit

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM rust:1.67.1-bullseye as build
30+
FROM rust:1.68.1-bullseye as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/armv6/Dockerfile.buildkit.alpine

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM blackdex/rust-musl:arm-musleabi-stable-1.67.1 as build
30+
FROM blackdex/rust-musl:arm-musleabi-stable-1.68.1 as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/armv7/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM rust:1.67.1-bullseye as build
30+
FROM rust:1.68.1-bullseye as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/armv7/Dockerfile.alpine

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM blackdex/rust-musl:armv7-musleabihf-stable-1.67.1 as build
30+
FROM blackdex/rust-musl:armv7-musleabihf-stable-1.68.1 as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/armv7/Dockerfile.buildkit

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM rust:1.67.1-bullseye as build
30+
FROM rust:1.68.1-bullseye as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎docker/armv7/Dockerfile.buildkit.alpine

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
FROM vaultwarden/web-vault@sha256:8b658e46339dde404b6370b381422e3522a133560264266e285acdd9adf807fe as vault
2828

2929
########################## BUILD IMAGE ##########################
30-
FROM blackdex/rust-musl:armv7-musleabihf-stable-1.67.1 as build
30+
FROM blackdex/rust-musl:armv7-musleabihf-stable-1.68.1 as build
3131

3232
# Build time options to avoid dpkg warnings and help with reproducible builds.
3333
ENV DEBIAN_FRONTEND=noninteractive \

‎hooks/arches.sh

+4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
#!/usr/bin/env bash
2+
13
# The default Debian-based images support these arches for all database backends.
24
arches=(
35
amd64
46
armv6
57
armv7
68
arm64
79
)
10+
export arches
811

912
if [[ "${DOCKER_TAG}" == *alpine ]]; then
1013
distro_suffix=.alpine
1114
fi
15+
export distro_suffix

‎hooks/build

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
echo ">>> Building images..."
44

5+
# shellcheck source=arches.sh
56
source ./hooks/arches.sh
67

78
if [[ -z "${SOURCE_COMMIT}" ]]; then
@@ -26,7 +27,7 @@ LABELS=(
2627
org.opencontainers.image.licenses="AGPL-3.0-only"
2728
org.opencontainers.image.revision="${SOURCE_COMMIT}"
2829
org.opencontainers.image.source="${SOURCE_REPOSITORY_URL}"
29-
org.opencontainers.image.url="https://hub.docker.com/r/${DOCKER_REPO#*/}"
30+
org.opencontainers.image.url="https://github.com/dani-garcia/vaultwarden"
3031
org.opencontainers.image.version="${SOURCE_VERSION}"
3132
)
3233
LABEL_ARGS=()
@@ -45,6 +46,6 @@ for arch in "${arches[@]}"; do
4546
docker build \
4647
"${LABEL_ARGS[@]}" \
4748
-t "${DOCKER_REPO}:${DOCKER_TAG}-${arch}" \
48-
-f docker/${arch}/Dockerfile${buildkit_suffix}${distro_suffix} \
49+
-f "docker/${arch}/Dockerfile${buildkit_suffix}${distro_suffix}" \
4950
.
5051
done

‎hooks/pre_build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -ex
44

‎hooks/push

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

3+
# shellcheck source=arches.sh
34
source ./hooks/arches.sh
45

56
export DOCKER_CLI_EXPERIMENTAL=enabled
@@ -41,7 +42,7 @@ LOCAL_REPO="${LOCAL_REGISTRY}/${REPO}"
4142

4243
echo ">>> Pushing images to local registry..."
4344

44-
for arch in ${arches[@]}; do
45+
for arch in "${arches[@]}"; do
4546
docker_image="${DOCKER_REPO}:${DOCKER_TAG}-${arch}"
4647
local_image="${LOCAL_REPO}:${DOCKER_TAG}-${arch}"
4748
docker tag "${docker_image}" "${local_image}"
@@ -71,9 +72,9 @@ tags=("${DOCKER_REPO}:${DOCKER_TAG}")
7172
# to make it easier for users to track the latest release.
7273
if [[ "${DOCKER_TAG}" =~ ^[0-9]+\.[0-9]+\.[0-9]+ ]]; then
7374
if [[ "${DOCKER_TAG}" == *alpine ]]; then
74-
tags+=(${DOCKER_REPO}:alpine)
75+
tags+=("${DOCKER_REPO}:alpine")
7576
else
76-
tags+=(${DOCKER_REPO}:latest)
77+
tags+=("${DOCKER_REPO}:latest")
7778
fi
7879
fi
7980

@@ -91,10 +92,10 @@ declare -A arch_to_platform=(
9192
[arm64]="linux/arm64"
9293
)
9394
platforms=()
94-
for arch in ${arches[@]}; do
95+
for arch in "${arches[@]}"; do
9596
platforms+=("${arch_to_platform[$arch]}")
9697
done
97-
platforms="$(join "," "${platforms[@]}")"
98+
platform="$(join "," "${platforms[@]}")"
9899

99100
# Run the build, pushing the resulting images and multi-arch manifest list to
100101
# Docker Hub. The Dockerfile is read from stdin to avoid sending any build
@@ -104,7 +105,7 @@ docker buildx build \
104105
--network host \
105106
--build-arg LOCAL_REPO="${LOCAL_REPO}" \
106107
--build-arg DOCKER_TAG="${DOCKER_TAG}" \
107-
--platform "${platforms}" \
108+
--platform "${platform}" \
108109
"${tag_args[@]}" \
109110
--push \
110111
- < ./docker/Dockerfile.buildx

‎rust-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.68.0
1+
1.68.1

0 commit comments

Comments
 (0)
Please sign in to comment.