mirror of
https://github.com/bitnami/containers.git
synced 2026-10-17 16:07:12 +02:00
[bitnami/harbor-portal] Release 2.6.0-debian-11-r0 (#5292)
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
@@ -6,20 +6,44 @@ ENV HOME="/" \
|
||||
|
||||
LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \
|
||||
org.opencontainers.image.description="Application packaged by Bitnami" \
|
||||
org.opencontainers.image.ref.name="2.5.3-debian-11-r15" \
|
||||
org.opencontainers.image.ref.name="2.6.0-debian-11-r0" \
|
||||
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/harbor-portal" \
|
||||
org.opencontainers.image.title="harbor-portal" \
|
||||
org.opencontainers.image.vendor="VMware, Inc." \
|
||||
org.opencontainers.image.version="2.5.3"
|
||||
org.opencontainers.image.version="2.6.0"
|
||||
|
||||
COPY prebuildfs /
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# Install required system packages and dependencies
|
||||
RUN install_packages acl ca-certificates curl gzip libc6 libcrypt1 libgeoip1 libpcre3 libssl1.1 procps tar zlib1g
|
||||
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "nginx" "1.23.1-1" --checksum b77b19f3cce1d5f59a83a2035b2f59763447ffe29ac4a267e417582a2cc5c4ea
|
||||
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "render-template" "1.0.3-152" --checksum 7909504f3232654c427681ecc8ed4b8599a2df0f17f26ff769a83ed167d05b69
|
||||
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "harbor" "2.5.3-2" --checksum 19f7ad897d62de280d8169a0310cb35a5fc2ef918ba3e68aea0505623235fe9d
|
||||
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "gosu" "1.14.0-153" --checksum d3ae0109be24e8bc56f97359b8290b91243454de946dd60bd8520a0896a88449
|
||||
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
||||
if [ ! -f nginx-1.23.1-2-linux-amd64-debian-11.tar.gz ]; then \
|
||||
curl -SsLf https://downloads.bitnami.com/files/stacksmith/nginx-1.23.1-2-linux-amd64-debian-11.tar.gz -O ; \
|
||||
fi && \
|
||||
echo "86af129d30d3ed8234c73815da136ac9a8d000dc6b9cd7522e8689e5c852bf0a nginx-1.23.1-2-linux-amd64-debian-11.tar.gz" | sha256sum -c - && \
|
||||
tar -zxf nginx-1.23.1-2-linux-amd64-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
||||
rm -rf nginx-1.23.1-2-linux-amd64-debian-11.tar.gz
|
||||
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
||||
if [ ! -f render-template-1.0.3-153-linux-amd64-debian-11.tar.gz ]; then \
|
||||
curl -SsLf https://downloads.bitnami.com/files/stacksmith/render-template-1.0.3-153-linux-amd64-debian-11.tar.gz -O ; \
|
||||
fi && \
|
||||
echo "c1f2cdabdcc920512e8936ab2c8a033e1aeb97801fa026f0b12432581bf849ae render-template-1.0.3-153-linux-amd64-debian-11.tar.gz" | sha256sum -c - && \
|
||||
tar -zxf render-template-1.0.3-153-linux-amd64-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
||||
rm -rf render-template-1.0.3-153-linux-amd64-debian-11.tar.gz
|
||||
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
||||
if [ ! -f harbor-2.6.0-0-linux-amd64-debian-11.tar.gz ]; then \
|
||||
curl -SsLf https://downloads.bitnami.com/files/stacksmith/harbor-2.6.0-0-linux-amd64-debian-11.tar.gz -O ; \
|
||||
fi && \
|
||||
echo "f55d233bdfcf055cc60b7ac871694d7512103cc5440ee47faf51774830fa0b7e harbor-2.6.0-0-linux-amd64-debian-11.tar.gz" | sha256sum -c - && \
|
||||
tar -zxf harbor-2.6.0-0-linux-amd64-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
||||
rm -rf harbor-2.6.0-0-linux-amd64-debian-11.tar.gz
|
||||
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
||||
if [ ! -f gosu-1.14.0-154-linux-amd64-debian-11.tar.gz ]; then \
|
||||
curl -SsLf https://downloads.bitnami.com/files/stacksmith/gosu-1.14.0-154-linux-amd64-debian-11.tar.gz -O ; \
|
||||
fi && \
|
||||
echo "e36c3d90f4fbfbe989f40947fa7c8ab817f12fcf97d3aef893c753a20ce976ab gosu-1.14.0-154-linux-amd64-debian-11.tar.gz" | sha256sum -c - && \
|
||||
tar -zxf gosu-1.14.0-154-linux-amd64-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
||||
rm -rf gosu-1.14.0-154-linux-amd64-debian-11.tar.gz
|
||||
RUN apt-get update && apt-get upgrade -y && \
|
||||
rm -r /var/lib/apt/lists /var/cache/apt/archives
|
||||
RUN chmod g+rwX /opt/bitnami
|
||||
@@ -29,7 +53,7 @@ RUN ln -sf /dev/stderr /opt/bitnami/nginx/logs/error.log
|
||||
COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/nginx/postunpack.sh
|
||||
RUN /opt/bitnami/scripts/harbor-portal/postunpack.sh
|
||||
ENV APP_VERSION="2.5.3" \
|
||||
ENV APP_VERSION="2.6.0" \
|
||||
BITNAMI_APP_NAME="harbor-portal" \
|
||||
NGINX_HTTPS_PORT_NUMBER="" \
|
||||
NGINX_HTTP_PORT_NUMBER="" \
|
||||
|
||||
@@ -34,7 +34,7 @@ services:
|
||||
- chartmuseum
|
||||
environment:
|
||||
- CORE_KEY=change-this-key
|
||||
- _REDIS_URL=redis:6379,100,
|
||||
- _REDIS_URL_CORE=redis://redis:6379/0
|
||||
- SYNC_REGISTRY=false
|
||||
- CHART_CACHE_DRIVER=redis
|
||||
- _REDIS_URL_REG=redis://redis:6379/1
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
{
|
||||
"gosu": {
|
||||
"arch": "amd64",
|
||||
"digest": "d3ae0109be24e8bc56f97359b8290b91243454de946dd60bd8520a0896a88449",
|
||||
"digest": "e36c3d90f4fbfbe989f40947fa7c8ab817f12fcf97d3aef893c753a20ce976ab",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "1.14.0-153"
|
||||
"version": "1.14.0-154"
|
||||
},
|
||||
"harbor": {
|
||||
"arch": "amd64",
|
||||
"digest": "19f7ad897d62de280d8169a0310cb35a5fc2ef918ba3e68aea0505623235fe9d",
|
||||
"digest": "f55d233bdfcf055cc60b7ac871694d7512103cc5440ee47faf51774830fa0b7e",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "2.5.3-2"
|
||||
"version": "2.6.0-0"
|
||||
},
|
||||
"nginx": {
|
||||
"arch": "amd64",
|
||||
"digest": "b77b19f3cce1d5f59a83a2035b2f59763447ffe29ac4a267e417582a2cc5c4ea",
|
||||
"digest": "86af129d30d3ed8234c73815da136ac9a8d000dc6b9cd7522e8689e5c852bf0a",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "1.23.1-1"
|
||||
"version": "1.23.1-2"
|
||||
},
|
||||
"render-template": {
|
||||
"arch": "amd64",
|
||||
"digest": "7909504f3232654c427681ecc8ed4b8599a2df0f17f26ff769a83ed167d05b69",
|
||||
"digest": "c1f2cdabdcc920512e8936ab2c8a033e1aeb97801fa026f0b12432581bf849ae",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "1.0.3-152"
|
||||
"version": "1.0.3-153"
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Library for managing Bitnami components
|
||||
|
||||
# Constants
|
||||
CACHE_ROOT="/tmp/bitnami/pkg/cache"
|
||||
DOWNLOAD_URL="https://downloads.bitnami.com/files/stacksmith"
|
||||
|
||||
# Functions
|
||||
|
||||
########################
|
||||
# Download and unpack a Bitnami package
|
||||
# Globals:
|
||||
# OS_NAME
|
||||
# OS_ARCH
|
||||
# OS_FLAVOUR
|
||||
# Arguments:
|
||||
# $1 - component's name
|
||||
# $2 - component's version
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
component_unpack() {
|
||||
local name="${1:?name is required}"
|
||||
local version="${2:?version is required}"
|
||||
local base_name="${name}-${version}-${OS_NAME}-${OS_ARCH}-${OS_FLAVOUR}"
|
||||
local package_sha256=""
|
||||
local directory="/opt/bitnami"
|
||||
|
||||
# Validate arguments
|
||||
shift 2
|
||||
while [ "$#" -gt 0 ]; do
|
||||
case "$1" in
|
||||
-c|--checksum)
|
||||
shift
|
||||
package_sha256="${1:?missing package checksum}"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command line flag $1" >&2
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
echo "Downloading $base_name package"
|
||||
if [ -f "${CACHE_ROOT}/${base_name}.tar.gz" ]; then
|
||||
echo "${CACHE_ROOT}/${base_name}.tar.gz already exists, skipping download."
|
||||
cp "${CACHE_ROOT}/${base_name}.tar.gz" .
|
||||
rm "${CACHE_ROOT}/${base_name}.tar.gz"
|
||||
if [ -f "${CACHE_ROOT}/${base_name}.tar.gz.sha256" ]; then
|
||||
echo "Using the local sha256 from ${CACHE_ROOT}/${base_name}.tar.gz.sha256"
|
||||
package_sha256="$(< "${CACHE_ROOT}/${base_name}.tar.gz.sha256")"
|
||||
rm "${CACHE_ROOT}/${base_name}.tar.gz.sha256"
|
||||
fi
|
||||
else
|
||||
curl --remote-name --silent --show-error --fail "${DOWNLOAD_URL}/${base_name}.tar.gz"
|
||||
fi
|
||||
if [ -n "$package_sha256" ]; then
|
||||
echo "Verifying package integrity"
|
||||
echo "$package_sha256 ${base_name}.tar.gz" | sha256sum --check - || return "$?"
|
||||
fi
|
||||
tar --directory "${directory}" --extract --gunzip --file "${base_name}.tar.gz" --no-same-owner --strip-components=2 || return "$?"
|
||||
rm "${base_name}.tar.gz"
|
||||
}
|
||||
@@ -128,18 +128,21 @@ nginx_validate() {
|
||||
print_validation_error "The allowed values for ${1} are: yes no"
|
||||
fi
|
||||
}
|
||||
check_valid_port() {
|
||||
local port_var="${1:?missing port variable}"
|
||||
local validate_port_args=()
|
||||
local err
|
||||
! am_i_root && validate_port_args+=("-unprivileged")
|
||||
if ! err="$(validate_port "${validate_port_args[@]}" "${!port_var}")"; then
|
||||
print_validation_error "An invalid port was specified in the environment variable ${port_var}: ${err}."
|
||||
fi
|
||||
}
|
||||
|
||||
! is_empty_value "$NGINX_ENABLE_ABSOLUTE_REDIRECT" && check_yes_no_value "NGINX_ENABLE_ABSOLUTE_REDIRECT"
|
||||
! is_empty_value "$NGINX_ENABLE_PORT_IN_REDIRECT" && check_yes_no_value "NGINX_ENABLE_PORT_IN_REDIRECT"
|
||||
|
||||
if [[ -n "${NGINX_HTTP_PORT_NUMBER:-}" ]]; then
|
||||
local -a validate_port_args=()
|
||||
! am_i_root && validate_port_args+=("-unprivileged")
|
||||
validate_port_args+=("${NGINX_HTTP_PORT_NUMBER}")
|
||||
if ! err=$(validate_port "${validate_port_args[@]}"); then
|
||||
print_validation_error "An invalid port was specified in the environment variable NGINX_HTTP_PORT_NUMBER: $err"
|
||||
fi
|
||||
fi
|
||||
! is_empty_value "$NGINX_HTTP_PORT_NUMBER" && check_valid_port "NGINX_HTTP_PORT_NUMBER"
|
||||
! is_empty_value "$NGINX_HTTPS_PORT_NUMBER" && check_valid_port "NGINX_HTTPS_PORT_NUMBER"
|
||||
|
||||
if ! is_file_writable "$NGINX_CONF_FILE"; then
|
||||
warn "The NGINX configuration file '${NGINX_CONF_FILE}' is not writable by current user. Configurations based on environment variables will not be applied."
|
||||
@@ -188,9 +191,14 @@ nginx_initialize() {
|
||||
nginx_user_configuration="$(sed -E "s/(^user)/# \1/g" "$NGINX_CONF_FILE")"
|
||||
is_file_writable "$NGINX_CONF_FILE" && echo "$nginx_user_configuration" >"$NGINX_CONF_FILE"
|
||||
fi
|
||||
# Configure HTTP port number
|
||||
if [[ -n "${NGINX_HTTP_PORT_NUMBER:-}" ]]; then
|
||||
nginx_configure_port "$NGINX_HTTP_PORT_NUMBER"
|
||||
fi
|
||||
# Configure HTTPS port number
|
||||
if [[ -n "${NGINX_HTTPS_PORT_NUMBER:-}" ]]; then
|
||||
nginx_configure_port "$NGINX_HTTPS_PORT_NUMBER" "${NGINX_SERVER_BLOCKS_DIR}/default-https-server-block.conf"
|
||||
fi
|
||||
nginx_configure "absolute_redirect" "$(is_boolean_yes "$NGINX_ENABLE_ABSOLUTE_REDIRECT" && echo "on" || echo "off" )"
|
||||
nginx_configure "port_in_redirect" "$(is_boolean_yes "$NGINX_ENABLE_PORT_IN_REDIRECT" && echo "on" || echo "off" )"
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@ nginx_patch_httpoxy_vulnerability
|
||||
|
||||
# Configure default HTTP port
|
||||
nginx_configure_port "$NGINX_DEFAULT_HTTP_PORT_NUMBER"
|
||||
# Configure default HTTPS port
|
||||
nginx_configure_port "$NGINX_DEFAULT_HTTPS_PORT_NUMBER" "${BITNAMI_ROOT_DIR}/scripts/nginx/server_blocks/default-https-server-block.conf"
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
# HTTPS Server
|
||||
server {
|
||||
# Port to listen on, can also be set in IP:PORT format
|
||||
listen 443 ssl;
|
||||
|
||||
ssl_certificate bitnami/certs/server.crt;
|
||||
ssl_certificate_key bitnami/certs/server.key;
|
||||
|
||||
include "/opt/bitnami/nginx/conf/bitnami/*.conf";
|
||||
|
||||
location /status {
|
||||
stub_status on;
|
||||
access_log off;
|
||||
allow 127.0.0.1;
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
@@ -27,20 +27,14 @@ am_i_root && ensure_user_exists "$NGINX_DAEMON_USER" --group "$NGINX_DAEMON_GROU
|
||||
# Run init scripts
|
||||
nginx_custom_init_scripts
|
||||
|
||||
# Validate HTTPS port number
|
||||
if [[ -n "${NGINX_HTTPS_PORT_NUMBER:-}" ]]; then
|
||||
validate_port_args=()
|
||||
! am_i_root && validate_port_args+=("-unprivileged")
|
||||
validate_port_args+=("$NGINX_HTTPS_PORT_NUMBER")
|
||||
if ! err=$(validate_port "${validate_port_args[@]}"); then
|
||||
error "An invalid port was specified in the environment variable NGINX_HTTPS_PORT_NUMBER: $err"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Fix logging issue when running as root
|
||||
! am_i_root || chmod o+w "$(readlink /dev/stdout)" "$(readlink /dev/stderr)"
|
||||
|
||||
# Configure HTTPS port number
|
||||
if [[ -n "${NGINX_HTTPS_PORT_NUMBER:-}" ]] && [[ ! -f "${NGINX_SERVER_BLOCKS_DIR}/default-https-server-block.conf" ]]; then
|
||||
cp "${BITNAMI_ROOT_DIR}/scripts/nginx/server_blocks/default-https-server-block.conf" "${NGINX_SERVER_BLOCKS_DIR}/default-https-server-block.conf"
|
||||
fi
|
||||
|
||||
# Initialize NGINX
|
||||
nginx_initialize
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
rolling-tags:
|
||||
- "2"
|
||||
- "2-debian-11"
|
||||
- "2.6.0"
|
||||
- "latest"
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
```console
|
||||
$ curl -LO https://raw.githubusercontent.com/bitnami/containers/main/bitnami/harbor-portal/docker-compose.yml
|
||||
$ curl -L https://github.com/bitnami/containers/archive/main.tar.gz | tar xz --strip=5 --wildcards '*main/bitnami/harbor-portal/2/debian-11/config'
|
||||
$ curl -L https://github.com/bitnami/containers/archive/main.tar.gz | tar xz --strip=1 --wildcards '*-main/bitnami/harbor-portal/config' && mv bitnami/harbor-portal/config . && rm -rf bitnami
|
||||
$ docker-compose up
|
||||
```
|
||||
|
||||
@@ -41,7 +41,7 @@ Non-root container images add an extra layer of security and are generally recom
|
||||
Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/).
|
||||
|
||||
|
||||
* [`2`, `2-debian-11`, `2.5.3`, `2.5.3-debian-11-r15`, `latest` (2/debian-11/Dockerfile)](https://github.com/bitnami/containers/blob/main/bitnami/harbor-portal/2/debian-11/Dockerfile)
|
||||
* [`2`, `2-debian-11`, `2.6.0`, `2.6.0-debian-11-r0`, `latest` (2/debian-11/Dockerfile)](https://github.com/bitnami/containers/blob/main/bitnami/harbor-portal/2/debian-11/Dockerfile)
|
||||
|
||||
## Configuration
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ services:
|
||||
- chartmuseum
|
||||
environment:
|
||||
- CORE_KEY=change-this-key
|
||||
- _REDIS_URL=redis:6379,100,
|
||||
- _REDIS_URL_CORE=redis://redis:6379/0
|
||||
- SYNC_REGISTRY=false
|
||||
- CHART_CACHE_DRIVER=redis
|
||||
- _REDIS_URL_REG=redis://redis:6379/1
|
||||
|
||||
Reference in New Issue
Block a user