1
0
Fork 0

Dockerfile.j2: clean up web-vault section

Dieser Commit ist enthalten in:
Jeremy Lin 2021-01-24 17:26:25 -08:00
Ursprung 06888251e3
Commit c5ca588a6f
7 geänderte Dateien mit 122 neuen und 73 gelöschten Zeilen

Datei anzeigen

@ -1,5 +1,5 @@
# This file was generated using a Jinja2 template. # This file was generated using a Jinja2 template.
# Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfile's. # Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfiles.
{% set build_stage_base_image = "rust:1.48" %} {% set build_stage_base_image = "rust:1.48" %}
{% if "alpine" in target_file %} {% if "alpine" in target_file %}
@ -44,19 +44,26 @@
# https://docs.docker.com/develop/develop-images/multistage-build/ # https://docs.docker.com/develop/develop-images/multistage-build/
# https://whitfin.io/speeding-up-rust-docker-builds/ # https://whitfin.io/speeding-up-rust-docker-builds/
####################### VAULT BUILD IMAGE ####################### ####################### VAULT BUILD IMAGE #######################
{% set vault_image_hash = "sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0" %} {% set vault_version = "2.17.1" %}
{% raw %} {% set vault_image_digest = "sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0" %}
# This hash is extracted from the docker web-vault builds and it's preferred over a simple tag because it's immutable. # The web-vault digest specifies a particular web-vault build on Docker Hub.
# It can be viewed in multiple ways: # Using the digest instead of the tag name provides better security,
# - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. # as the digest of an image is immutable, whereas a tag name can later
# - From the console, with the following commands: # be changed to point to a malicious image.
# docker pull bitwardenrs/web-vault:v2.17.1
# docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1
# #
# - To do the opposite, and get the tag from the hash, you can do: # To verify the current digest for a given tag name:
# docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 # - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
{% endraw %} # click the tag name to view the digest of the image it currently points to.
FROM bitwardenrs/web-vault@{{ vault_image_hash }} as vault # - From the command line:
# $ docker pull bitwardenrs/web-vault:v{{ vault_version }}
# $ docker image inspect --format "{{ '{{' }}.RepoDigests}}" bitwardenrs/web-vault:v{{ vault_version }}
# [bitwardenrs/web-vault@{{ vault_image_digest }}]
#
# - Conversely, to get the tag name from the digest:
# $ docker image inspect --format "{{ '{{' }}.RepoTags}}" bitwardenrs/web-vault@{{ vault_image_digest }}
# [bitwardenrs/web-vault:v{{ vault_version }}]
#
FROM bitwardenrs/web-vault@{{ vault_image_digest }} as vault
########################## BUILD IMAGE ########################## ########################## BUILD IMAGE ##########################
FROM {{ build_stage_base_image }} as build FROM {{ build_stage_base_image }} as build

Datei anzeigen

@ -1,20 +1,27 @@
# This file was generated using a Jinja2 template. # This file was generated using a Jinja2 template.
# Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfile's. # Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfiles.
# Using multistage build: # Using multistage build:
# https://docs.docker.com/develop/develop-images/multistage-build/ # https://docs.docker.com/develop/develop-images/multistage-build/
# https://whitfin.io/speeding-up-rust-docker-builds/ # https://whitfin.io/speeding-up-rust-docker-builds/
####################### VAULT BUILD IMAGE ####################### ####################### VAULT BUILD IMAGE #######################
# The web-vault digest specifies a particular web-vault build on Docker Hub.
# This hash is extracted from the docker web-vault builds and it's preferred over a simple tag because it's immutable. # Using the digest instead of the tag name provides better security,
# It can be viewed in multiple ways: # as the digest of an image is immutable, whereas a tag name can later
# - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. # be changed to point to a malicious image.
# - From the console, with the following commands: #
# docker pull bitwardenrs/web-vault:v2.17.1 # To verify the current digest for a given tag name:
# docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1 # - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
# click the tag name to view the digest of the image it currently points to.
# - From the command line:
# $ docker pull bitwardenrs/web-vault:v2.17.1
# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1
# [bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0]
#
# - Conversely, to get the tag name from the digest:
# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0
# [bitwardenrs/web-vault:v2.17.1]
# #
# - To do the opposite, and get the tag from the hash, you can do:
# docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0
FROM bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 as vault FROM bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 as vault
########################## BUILD IMAGE ########################## ########################## BUILD IMAGE ##########################

Datei anzeigen

@ -1,20 +1,27 @@
# This file was generated using a Jinja2 template. # This file was generated using a Jinja2 template.
# Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfile's. # Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfiles.
# Using multistage build: # Using multistage build:
# https://docs.docker.com/develop/develop-images/multistage-build/ # https://docs.docker.com/develop/develop-images/multistage-build/
# https://whitfin.io/speeding-up-rust-docker-builds/ # https://whitfin.io/speeding-up-rust-docker-builds/
####################### VAULT BUILD IMAGE ####################### ####################### VAULT BUILD IMAGE #######################
# The web-vault digest specifies a particular web-vault build on Docker Hub.
# This hash is extracted from the docker web-vault builds and it's preferred over a simple tag because it's immutable. # Using the digest instead of the tag name provides better security,
# It can be viewed in multiple ways: # as the digest of an image is immutable, whereas a tag name can later
# - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. # be changed to point to a malicious image.
# - From the console, with the following commands: #
# docker pull bitwardenrs/web-vault:v2.17.1 # To verify the current digest for a given tag name:
# docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1 # - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
# click the tag name to view the digest of the image it currently points to.
# - From the command line:
# $ docker pull bitwardenrs/web-vault:v2.17.1
# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1
# [bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0]
#
# - Conversely, to get the tag name from the digest:
# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0
# [bitwardenrs/web-vault:v2.17.1]
# #
# - To do the opposite, and get the tag from the hash, you can do:
# docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0
FROM bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 as vault FROM bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 as vault
########################## BUILD IMAGE ########################## ########################## BUILD IMAGE ##########################

Datei anzeigen

@ -1,20 +1,27 @@
# This file was generated using a Jinja2 template. # This file was generated using a Jinja2 template.
# Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfile's. # Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfiles.
# Using multistage build: # Using multistage build:
# https://docs.docker.com/develop/develop-images/multistage-build/ # https://docs.docker.com/develop/develop-images/multistage-build/
# https://whitfin.io/speeding-up-rust-docker-builds/ # https://whitfin.io/speeding-up-rust-docker-builds/
####################### VAULT BUILD IMAGE ####################### ####################### VAULT BUILD IMAGE #######################
# The web-vault digest specifies a particular web-vault build on Docker Hub.
# This hash is extracted from the docker web-vault builds and it's preferred over a simple tag because it's immutable. # Using the digest instead of the tag name provides better security,
# It can be viewed in multiple ways: # as the digest of an image is immutable, whereas a tag name can later
# - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. # be changed to point to a malicious image.
# - From the console, with the following commands: #
# docker pull bitwardenrs/web-vault:v2.17.1 # To verify the current digest for a given tag name:
# docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1 # - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
# click the tag name to view the digest of the image it currently points to.
# - From the command line:
# $ docker pull bitwardenrs/web-vault:v2.17.1
# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1
# [bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0]
#
# - Conversely, to get the tag name from the digest:
# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0
# [bitwardenrs/web-vault:v2.17.1]
# #
# - To do the opposite, and get the tag from the hash, you can do:
# docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0
FROM bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 as vault FROM bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 as vault
########################## BUILD IMAGE ########################## ########################## BUILD IMAGE ##########################

Datei anzeigen

@ -1,20 +1,27 @@
# This file was generated using a Jinja2 template. # This file was generated using a Jinja2 template.
# Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfile's. # Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfiles.
# Using multistage build: # Using multistage build:
# https://docs.docker.com/develop/develop-images/multistage-build/ # https://docs.docker.com/develop/develop-images/multistage-build/
# https://whitfin.io/speeding-up-rust-docker-builds/ # https://whitfin.io/speeding-up-rust-docker-builds/
####################### VAULT BUILD IMAGE ####################### ####################### VAULT BUILD IMAGE #######################
# The web-vault digest specifies a particular web-vault build on Docker Hub.
# This hash is extracted from the docker web-vault builds and it's preferred over a simple tag because it's immutable. # Using the digest instead of the tag name provides better security,
# It can be viewed in multiple ways: # as the digest of an image is immutable, whereas a tag name can later
# - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. # be changed to point to a malicious image.
# - From the console, with the following commands: #
# docker pull bitwardenrs/web-vault:v2.17.1 # To verify the current digest for a given tag name:
# docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1 # - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
# click the tag name to view the digest of the image it currently points to.
# - From the command line:
# $ docker pull bitwardenrs/web-vault:v2.17.1
# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1
# [bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0]
#
# - Conversely, to get the tag name from the digest:
# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0
# [bitwardenrs/web-vault:v2.17.1]
# #
# - To do the opposite, and get the tag from the hash, you can do:
# docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0
FROM bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 as vault FROM bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 as vault
########################## BUILD IMAGE ########################## ########################## BUILD IMAGE ##########################

Datei anzeigen

@ -1,20 +1,27 @@
# This file was generated using a Jinja2 template. # This file was generated using a Jinja2 template.
# Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfile's. # Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfiles.
# Using multistage build: # Using multistage build:
# https://docs.docker.com/develop/develop-images/multistage-build/ # https://docs.docker.com/develop/develop-images/multistage-build/
# https://whitfin.io/speeding-up-rust-docker-builds/ # https://whitfin.io/speeding-up-rust-docker-builds/
####################### VAULT BUILD IMAGE ####################### ####################### VAULT BUILD IMAGE #######################
# The web-vault digest specifies a particular web-vault build on Docker Hub.
# This hash is extracted from the docker web-vault builds and it's preferred over a simple tag because it's immutable. # Using the digest instead of the tag name provides better security,
# It can be viewed in multiple ways: # as the digest of an image is immutable, whereas a tag name can later
# - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. # be changed to point to a malicious image.
# - From the console, with the following commands: #
# docker pull bitwardenrs/web-vault:v2.17.1 # To verify the current digest for a given tag name:
# docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1 # - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
# click the tag name to view the digest of the image it currently points to.
# - From the command line:
# $ docker pull bitwardenrs/web-vault:v2.17.1
# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1
# [bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0]
#
# - Conversely, to get the tag name from the digest:
# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0
# [bitwardenrs/web-vault:v2.17.1]
# #
# - To do the opposite, and get the tag from the hash, you can do:
# docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0
FROM bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 as vault FROM bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 as vault
########################## BUILD IMAGE ########################## ########################## BUILD IMAGE ##########################

Datei anzeigen

@ -1,20 +1,27 @@
# This file was generated using a Jinja2 template. # This file was generated using a Jinja2 template.
# Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfile's. # Please make your changes in `Dockerfile.j2` and then `make` the individual Dockerfiles.
# Using multistage build: # Using multistage build:
# https://docs.docker.com/develop/develop-images/multistage-build/ # https://docs.docker.com/develop/develop-images/multistage-build/
# https://whitfin.io/speeding-up-rust-docker-builds/ # https://whitfin.io/speeding-up-rust-docker-builds/
####################### VAULT BUILD IMAGE ####################### ####################### VAULT BUILD IMAGE #######################
# The web-vault digest specifies a particular web-vault build on Docker Hub.
# This hash is extracted from the docker web-vault builds and it's preferred over a simple tag because it's immutable. # Using the digest instead of the tag name provides better security,
# It can be viewed in multiple ways: # as the digest of an image is immutable, whereas a tag name can later
# - From the https://hub.docker.com/repository/docker/bitwardenrs/web-vault/tags page, click the tag name and the digest should be there. # be changed to point to a malicious image.
# - From the console, with the following commands: #
# docker pull bitwardenrs/web-vault:v2.17.1 # To verify the current digest for a given tag name:
# docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1 # - From https://hub.docker.com/r/bitwardenrs/web-vault/tags,
# click the tag name to view the digest of the image it currently points to.
# - From the command line:
# $ docker pull bitwardenrs/web-vault:v2.17.1
# $ docker image inspect --format "{{.RepoDigests}}" bitwardenrs/web-vault:v2.17.1
# [bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0]
#
# - Conversely, to get the tag name from the digest:
# $ docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0
# [bitwardenrs/web-vault:v2.17.1]
# #
# - To do the opposite, and get the tag from the hash, you can do:
# docker image inspect --format "{{.RepoTags}}" bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0
FROM bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 as vault FROM bitwardenrs/web-vault@sha256:dcb7884dc5845b3842ff2204fe77482000b771495c6c359297ec3c03330d65e0 as vault
########################## BUILD IMAGE ########################## ########################## BUILD IMAGE ##########################