diff --git a/.github/workflows/jq-template.awk b/.github/workflows/jq-template.awk deleted file mode 100644 index b6127e7..0000000 --- a/.github/workflows/jq-template.awk +++ /dev/null @@ -1,135 +0,0 @@ -# this script assumes gawk! (busybox "awk" is not quite sufficient) - -# see https://github.com/docker-library/php or https://github.com/docker-library/golang for examples of usage ("apply-templates.sh") - -# escape an arbitrary string for passing back to jq as program input -function jq_escape(str) { - gsub(/\\/, "\\\\", str) - gsub(/\n/, "\\n", str) - gsub(/\r/, "\\r", str) - gsub(/\t/, "\\t", str) - gsub(/"/, "\\\"", str) - return "\"" str "\"" -} - -# return the number of times needle appears in haystack -function num(haystack, needle, # parameters - ret, i ) # locals -{ - ret = 0 - while (i = index(haystack, needle)) { - ret++ - haystack = substr(haystack, i + length(needle)) - } - return ret -} - -BEGIN { - jq_expr_defs = "" - jq_expr = "" - agg_jq = "" - agg_text = "" - - OPEN = "{{" - CLOSE = "}}" - CLOSE_EAT_EOL = "-" CLOSE ORS -} - -function trim(str) { - sub(/^[[:space:]]+/, "", str) - sub(/[[:space:]]+$/, "", str) - return str -} -function append(str) { - if (jq_expr && jq_expr !~ /\($/ && str !~ /^\)/) { - jq_expr = jq_expr "\n+ " - } else if (jq_expr) { - jq_expr = jq_expr "\n" - } - jq_expr = jq_expr str -} -function append_string(str) { - if (!str) return - str = jq_escape(str) - append(str) -} -function append_jq(expr) { - if (!expr) return - expr = trim(expr) - if (!expr) return - if (expr ~ /^#[^\n]*$/) return # ignore pure comment lines {{ # ... -}} - if (expr ~ /^(def|include|import)[[:space:]]/) { # a few things need to go at the start of our "script" - jq_expr_defs = jq_expr_defs expr ";\n" - return - } - # if expr doesn't begin with ")" or end with "(", wrap it in parenthesis (so our addition chain works properly) - if (expr !~ /^\)/) expr = "(" expr - if (expr !~ /\($/) expr = expr ")" - append(expr) -} - -{ - line = $0 ORS - - i = 0 - if (agg_jq || (i = index(line, OPEN))) { - if (i) { - agg_text = agg_text substr(line, 1, i - 1) - line = substr(line, i) - } - append_string(agg_text) - agg_text = "" - - agg_jq = agg_jq line - line = "" - - if (num(agg_jq, OPEN) > num(agg_jq, CLOSE)) { - next - } - - while (i = index(agg_jq, OPEN)) { - line = substr(agg_jq, 1, i - 1) - agg_jq = substr(agg_jq, i + length(OPEN)) - if (i = index(agg_jq, CLOSE_EAT_EOL)) { - expr = substr(agg_jq, 1, i - 1) - agg_jq = substr(agg_jq, i + length(CLOSE_EAT_EOL)) - } - else { - i = index(agg_jq, CLOSE) - expr = substr(agg_jq, 1, i - 1) - agg_jq = substr(agg_jq, i + length(CLOSE)) - } - append_string(line) - append_jq(expr) - } - line = agg_jq - agg_jq = "" - } - - if (line) { - agg_text = agg_text line - } -} - -END { - append_string(agg_text) - agg_text = "" - - append_jq(agg_jq) - agg_jq = "" - - jq_expr = "if env.version then .[env.version] else . end | (\n" jq_expr "\n)" - jq_expr = jq_expr_defs jq_expr - - if (ENVIRON["DEBUG"]) { - print jq_expr > "/dev/stderr" - } - - prog = "jq --join-output --from-file /dev/stdin versions.json" - printf "%s", jq_expr | prog - - e = close(prog) - if (e != 0) { - exit(e) - } -} \ No newline at end of file diff --git a/.github/workflows/template-helper-functions.jq b/.github/workflows/template-helper-functions.jq deleted file mode 100644 index cc97b5f..0000000 --- a/.github/workflows/template-helper-functions.jq +++ /dev/null @@ -1,33 +0,0 @@ -#input package -# { -# name: "packageName", -# version: "packageVersion", -# params: { -# "foo": "bar" -# } -# licenses: ["packageLicense" ... ] -# } -#output: object -def sbom: - { - spdxVersion: "SPDX-2.3", - SPDXID: "SPDXRef-DOCUMENT", - name: (.name + "-sbom"), - packages: [ - { - name: .name, - versionInfo: .version, - SPDXID: ("SPDXRef-Package--" + .name), - externalRefs: [ - { - referenceCategory: "PACKAGE-MANAGER", - referenceType: "purl", - referenceLocator: ("pkg:generic/" + .name + "@" + .version + "?" + (.params | [to_entries[] | .key + "=" + .value] | join("\u0026"))) - } - ], - } - + if .licenses then { licenseDeclared: (.licenses | join(" AND ")) } else {} end - + if .supplier then { supplier: .supplier } else {} end - ] - } -; \ No newline at end of file diff --git a/.gitignore b/.gitignore index c8db931..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +0,0 @@ -.jq-template.awk -.template-helper-functions.jq diff --git a/7.2/alpine/Dockerfile b/7.2/alpine/Dockerfile deleted file mode 100644 index 03ae88e..0000000 --- a/7.2/alpine/Dockerfile +++ /dev/null @@ -1,143 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.19 - -# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added -RUN set -eux; \ -# alpine already has a gid 999, so we'll use the next id - addgroup -S -g 1000 valkey; \ - adduser -S -G valkey -u 999 valkey - -# runtime dependencies -RUN set -eux; \ - apk add --no-cache \ -# add tzdata for https://github.com/docker-library/valkey/issues/138 - tzdata \ - ; - -# grab gosu for easy step-down from root -# https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.17 -RUN set -eux; \ - apk add --no-cache --virtual .gosu-fetch gnupg; \ - arch="$(apk --print-arch)"; \ - case "$arch" in \ - 'x86_64') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64'; sha256='bbc4136d03ab138b1ad66fa4fc051bafc6cc7ffae632b069a53657279a450de3' ;; \ - 'aarch64') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-arm64'; sha256='c3805a85d17f4454c23d7059bcb97e1ec1af272b90126e79ed002342de08389b' ;; \ - 'armhf') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-armhf'; sha256='e5866286277ff2a2159fb9196fea13e0a59d3f1091ea46ddb985160b94b6841b' ;; \ - 'x86') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-i386'; sha256='087dbb8fe479537e64f9c86fa49ff3b41dee1cbd28739a19aaef83dc8186b1ca' ;; \ - 'ppc64le') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-ppc64el'; sha256='1891acdcfa70046818ab6ed3c52b9d42fa10fbb7b340eb429c8c7849691dbd76' ;; \ - 'riscv64') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-riscv64'; sha256='38a6444b57adce135c42d5a3689f616fc7803ddc7a07ff6f946f2ebc67a26ba6' ;; \ - 's390x') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-s390x'; sha256='69873bab588192f760547ca1f75b27cfcf106e9f7403fee6fd0600bc914979d0' ;; \ - 'armv7') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-armhf'; sha256='e5866286277ff2a2159fb9196fea13e0a59d3f1091ea46ddb985160b94b6841b' ;; \ - *) echo >&2 "error: unsupported gosu architecture: '$arch'"; exit 1 ;; \ - esac; \ - wget -O /usr/local/bin/gosu.asc "$url.asc"; \ - wget -O /usr/local/bin/gosu "$url"; \ - echo "$sha256 */usr/local/bin/gosu" | sha256sum -c -; \ - export GNUPGHOME="$(mktemp -d)"; \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \ - gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \ - apk del --no-network .gosu-fetch; \ - chmod +x /usr/local/bin/gosu; \ - gosu --version; \ - gosu nobody true - -ENV VALKEY_VERSION 7.2.4 -ENV VALKEY_DOWNLOAD_URL http://download.valkey.io/releases/valkey-7.2.4.tar.gz -ENV VALKEY_DOWNLOAD_SHA 8d104c26a154b29fd67d6568b4f375212212ad41e0c2caa3d66480e78dbd3b59 - -RUN set -eux; \ - \ - apk add --no-cache --virtual .build-deps \ - coreutils \ - dpkg-dev dpkg \ - gcc \ - linux-headers \ - make \ - musl-dev \ - openssl-dev \ -# install real "wget" to avoid: -# + wget -O valkey.tar.gz https://download.valkey.io/releases/valkey-6.0.6.tar.gz -# Connecting to download.valkey.io (45.60.121.1:80) -# wget: bad header line: XxhODalH: btu; path=/; Max-Age=900 - wget \ - ; \ - \ - wget -O valkey.tar.gz "$VALKEY_DOWNLOAD_URL"; \ - echo "$VALKEY_DOWNLOAD_SHA *valkey.tar.gz" | sha256sum -c -; \ - mkdir -p /usr/src/valkey; \ - tar -xzf valkey.tar.gz -C /usr/src/valkey --strip-components=1; \ - rm valkey.tar.gz; \ - \ -# disable Redis protected mode [1] as it is unnecessary in context of Docker -# (ports are not automatically exposed when running inside Docker, but rather explicitly by specifying -p / -P) -# [1]: https://github.com/valkey/valkey/commit/edd4d555df57dc84265fdfb4ef59a4678832f6da - grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' /usr/src/valkey/src/config.c; \ - sed -ri 's!^( *createBoolConfig[(]"protected-mode",.*, *)1( *,.*[)],)$!\10\2!' /usr/src/valkey/src/config.c; \ - grep -E '^ *createBoolConfig[(]"protected-mode",.*, *0 *,.*[)],$' /usr/src/valkey/src/config.c; \ -# for future reference, we modify this directly in the source instead of just supplying a default configuration flag because apparently "if you specify any argument to valkey-server, [it assumes] you are going to specify everything" -# see also https://github.com/docker-library/valkey/issues/4#issuecomment-50780840 -# (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default) - \ -# https://github.com/jemalloc/jemalloc/issues/467 -- we need to patch the "./configure" for the bundled jemalloc to match how Debian compiles, for compatibility -# (also, we do cross-builds, so we need to embed the appropriate "--build=xxx" values to that "./configure" invocation) - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - extraJemallocConfigureFlags="--build=$gnuArch"; \ -# https://salsa.debian.org/debian/jemalloc/-/blob/c0a88c37a551be7d12e4863435365c9a6a51525f/debian/rules#L8-23 - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ - amd64 | i386 | x32) extraJemallocConfigureFlags="$extraJemallocConfigureFlags --with-lg-page=12" ;; \ - *) extraJemallocConfigureFlags="$extraJemallocConfigureFlags --with-lg-page=16" ;; \ - esac; \ - extraJemallocConfigureFlags="$extraJemallocConfigureFlags --with-lg-hugepage=21"; \ - grep -F 'cd jemalloc && ./configure ' /usr/src/valkey/deps/Makefile; \ - sed -ri 's!cd jemalloc && ./configure !&'"$extraJemallocConfigureFlags"' !' /usr/src/valkey/deps/Makefile; \ - grep -F "cd jemalloc && ./configure $extraJemallocConfigureFlags " /usr/src/valkey/deps/Makefile; \ - \ - export BUILD_TLS=yes; \ - make -C /usr/src/valkey -j "$(nproc)" all; \ - make -C /usr/src/valkey install; \ - \ -# TODO https://github.com/redis/redis/pull/3494 (deduplicate "valkey-server" copies) - serverMd5="$(md5sum /usr/local/bin/valkey-server | cut -d' ' -f1)"; export serverMd5; \ - find /usr/local/bin/valkey* -maxdepth 0 \ - -type f -not -name valkey-server \ - -exec sh -eux -c ' \ - md5="$(md5sum "$1" | cut -d" " -f1)"; \ - test "$md5" = "$serverMd5"; \ - ' -- '{}' ';' \ - -exec ln -svfT 'valkey-server' '{}' ';' \ - ; \ - \ - rm -r /usr/src/valkey; \ - \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .valkey-rundeps $runDeps; \ - apk del --no-network .build-deps; \ - \ - valkey-cli --version; \ - valkey-server --version; \ - \ - echo '{"spdxVersion":"SPDX-2.3","SPDXID":"SPDXRef-DOCUMENT","name":"valkey-server-sbom","packages":[{"name":"valkey-server","versionInfo":"7.2.4","SPDXID":"SPDXRef-Package--valkey-server","externalRefs":[{"referenceCategory":"PACKAGE-MANAGER","referenceType":"purl","referenceLocator":"pkg:generic/valkey-server@7.2.4?os_name=alpine&os_version=3.19"}],"licenseDeclared":"BSD-3-Clause"}]}' > /usr/local/valkey.spdx.json - -RUN mkdir /data && chown valkey:valkey /data -VOLUME /data -WORKDIR /data - -COPY docker-entrypoint.sh /usr/local/bin/ -ENTRYPOINT ["docker-entrypoint.sh"] - -EXPOSE 6379 -CMD ["valkey-server"] diff --git a/7.2/alpine/docker-entrypoint.sh b/7.2/alpine/docker-entrypoint.sh deleted file mode 100755 index 0f12c3d..0000000 --- a/7.2/alpine/docker-entrypoint.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -set -e - -# first arg is `-f` or `--some-option` -# or first arg is `something.conf` -if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then - set -- valkey-server "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'valkey-server' -a "$(id -u)" = '0' ]; then - find . \! -user valkey -exec chown valkey '{}' + - exec gosu valkey "$0" "$@" -fi - -# set an appropriate umask (if one isn't set already) -# - https://github.com/docker-library/redis/issues/305 -# - https://github.com/redis/redis/blob/bb875603fb7ff3f9d19aad906bd45d7db98d9a39/utils/systemd-redis_server.service#L37 -um="$(umask)" -if [ "$um" = '0022' ]; then - umask 0077 -fi - -exec "$@" diff --git a/7.2/debian/Dockerfile b/7.2/debian/Dockerfile deleted file mode 100644 index 95835d8..0000000 --- a/7.2/debian/Dockerfile +++ /dev/null @@ -1,152 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:bookworm-slim - -# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added -RUN set -eux; \ - groupadd -r -g 999 valkey; \ - useradd -r -g valkey -u 999 valkey - -# runtime dependencies -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ -# add tzdata explicitly for https://github.com/docker-library/valkey/issues/138 (see also https://bugs.debian.org/837060 and related) - tzdata \ - ; \ - rm -rf /var/lib/apt/lists/* - -# grab gosu for easy step-down from root -# https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.17 -RUN set -eux; \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates gnupg wget; \ - rm -rf /var/lib/apt/lists/*; \ - arch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ - case "$arch" in \ - 'amd64') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64'; sha256='bbc4136d03ab138b1ad66fa4fc051bafc6cc7ffae632b069a53657279a450de3' ;; \ - 'arm64') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-arm64'; sha256='c3805a85d17f4454c23d7059bcb97e1ec1af272b90126e79ed002342de08389b' ;; \ - 'armel') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-armel'; sha256='f9969910fa141140438c998cfa02f603bf213b11afd466dcde8fa940e700945d' ;; \ - 'i386') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-i386'; sha256='087dbb8fe479537e64f9c86fa49ff3b41dee1cbd28739a19aaef83dc8186b1ca' ;; \ - 'mips64el') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-mips64el'; sha256='87140029d792595e660be0015341dfa1c02d1181459ae40df9f093e471d75b70' ;; \ - 'ppc64el') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-ppc64el'; sha256='1891acdcfa70046818ab6ed3c52b9d42fa10fbb7b340eb429c8c7849691dbd76' ;; \ - 'riscv64') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-riscv64'; sha256='38a6444b57adce135c42d5a3689f616fc7803ddc7a07ff6f946f2ebc67a26ba6' ;; \ - 's390x') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-s390x'; sha256='69873bab588192f760547ca1f75b27cfcf106e9f7403fee6fd0600bc914979d0' ;; \ - 'armhf') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-armhf'; sha256='e5866286277ff2a2159fb9196fea13e0a59d3f1091ea46ddb985160b94b6841b' ;; \ - *) echo >&2 "error: unsupported gosu architecture: '$arch'"; exit 1 ;; \ - esac; \ - wget -O /usr/local/bin/gosu.asc "$url.asc"; \ - wget -O /usr/local/bin/gosu "$url"; \ - echo "$sha256 */usr/local/bin/gosu" | sha256sum -c -; \ - export GNUPGHOME="$(mktemp -d)"; \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \ - gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - chmod +x /usr/local/bin/gosu; \ - gosu --version; \ - gosu nobody true - -ENV VALKEY_VERSION 7.2.4 -ENV VALKEY_DOWNLOAD_URL http://download.valkey.io/releases/valkey-7.2.4.tar.gz -ENV VALKEY_DOWNLOAD_SHA 8d104c26a154b29fd67d6568b4f375212212ad41e0c2caa3d66480e78dbd3b59 - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - wget \ - \ - dpkg-dev \ - gcc \ - libc6-dev \ - libssl-dev \ - make \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - wget -O valkey.tar.gz "$VALKEY_DOWNLOAD_URL"; \ - echo "$VALKEY_DOWNLOAD_SHA *valkey.tar.gz" | sha256sum -c -; \ - mkdir -p /usr/src/valkey; \ - tar -xzf valkey.tar.gz -C /usr/src/valkey --strip-components=1; \ - rm valkey.tar.gz; \ - \ -# disable Redis protected mode [1] as it is unnecessary in context of Docker -# (ports are not automatically exposed when running inside Docker, but rather explicitly by specifying -p / -P) -# [1]: https://github.com/valkey/valkey/commit/edd4d555df57dc84265fdfb4ef59a4678832f6da - grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' /usr/src/valkey/src/config.c; \ - sed -ri 's!^( *createBoolConfig[(]"protected-mode",.*, *)1( *,.*[)],)$!\10\2!' /usr/src/valkey/src/config.c; \ - grep -E '^ *createBoolConfig[(]"protected-mode",.*, *0 *,.*[)],$' /usr/src/valkey/src/config.c; \ -# for future reference, we modify this directly in the source instead of just supplying a default configuration flag because apparently "if you specify any argument to valkey-server, [it assumes] you are going to specify everything" -# see also https://github.com/docker-library/valkey/issues/4#issuecomment-50780840 -# (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default) - \ -# https://github.com/jemalloc/jemalloc/issues/467 -- we need to patch the "./configure" for the bundled jemalloc to match how Debian compiles, for compatibility -# (also, we do cross-builds, so we need to embed the appropriate "--build=xxx" values to that "./configure" invocation) - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - extraJemallocConfigureFlags="--build=$gnuArch"; \ -# https://salsa.debian.org/debian/jemalloc/-/blob/c0a88c37a551be7d12e4863435365c9a6a51525f/debian/rules#L8-23 - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ - amd64 | i386 | x32) extraJemallocConfigureFlags="$extraJemallocConfigureFlags --with-lg-page=12" ;; \ - *) extraJemallocConfigureFlags="$extraJemallocConfigureFlags --with-lg-page=16" ;; \ - esac; \ - extraJemallocConfigureFlags="$extraJemallocConfigureFlags --with-lg-hugepage=21"; \ - grep -F 'cd jemalloc && ./configure ' /usr/src/valkey/deps/Makefile; \ - sed -ri 's!cd jemalloc && ./configure !&'"$extraJemallocConfigureFlags"' !' /usr/src/valkey/deps/Makefile; \ - grep -F "cd jemalloc && ./configure $extraJemallocConfigureFlags " /usr/src/valkey/deps/Makefile; \ - \ - export BUILD_TLS=yes; \ - make -C /usr/src/valkey -j "$(nproc)" all; \ - make -C /usr/src/valkey install; \ - \ -# TODO https://github.com/valkey/valkey/pull/3494 (deduplicate "valkey-server" copies) - serverMd5="$(md5sum /usr/local/bin/valkey-server | cut -d' ' -f1)"; export serverMd5; \ - find /usr/local/bin/valkey* -maxdepth 0 \ - -type f -not -name valkey-server \ - -exec sh -eux -c ' \ - md5="$(md5sum "$1" | cut -d" " -f1)"; \ - test "$md5" = "$serverMd5"; \ - ' -- '{}' ';' \ - -exec ln -svfT 'valkey-server' '{}' ';' \ - ; \ - \ - rm -r /usr/src/valkey; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -r apt-mark manual \ - ; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - \ - valkey-cli --version; \ - valkey-server --version; \ - \ - echo '{"spdxVersion":"SPDX-2.3","SPDXID":"SPDXRef-DOCUMENT","name":"valkey-server-sbom","packages":[{"name":"valkey-server","versionInfo":"7.2.4","SPDXID":"SPDXRef-Package--valkey-server","externalRefs":[{"referenceCategory":"PACKAGE-MANAGER","referenceType":"purl","referenceLocator":"pkg:generic/valkey-server@7.2.4?os_name=debian&os_version=bookworm"}],"licenseDeclared":"BSD-3-Clause"}]}' > /usr/local/valkey.spdx.json - -RUN mkdir /data && chown valkey:valkey /data -VOLUME /data -WORKDIR /data - -COPY docker-entrypoint.sh /usr/local/bin/ -ENTRYPOINT ["docker-entrypoint.sh"] - -EXPOSE 6379 -CMD ["valkey-server"] diff --git a/7.2/debian/docker-entrypoint.sh b/7.2/debian/docker-entrypoint.sh deleted file mode 100755 index 0f12c3d..0000000 --- a/7.2/debian/docker-entrypoint.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -set -e - -# first arg is `-f` or `--some-option` -# or first arg is `something.conf` -if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then - set -- valkey-server "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'valkey-server' -a "$(id -u)" = '0' ]; then - find . \! -user valkey -exec chown valkey '{}' + - exec gosu valkey "$0" "$@" -fi - -# set an appropriate umask (if one isn't set already) -# - https://github.com/docker-library/redis/issues/305 -# - https://github.com/redis/redis/blob/bb875603fb7ff3f9d19aad906bd45d7db98d9a39/utils/systemd-redis_server.service#L37 -um="$(umask)" -if [ "$um" = '0022' ]; then - umask 0077 -fi - -exec "$@" diff --git a/unstable/debian/Dockerfile b/unstable/debian/Dockerfile index 07c6784..b45933b 100644 --- a/unstable/debian/Dockerfile +++ b/unstable/debian/Dockerfile @@ -77,7 +77,6 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/*; \ \ wget -O valkey.tar.gz "$VALKEY_DOWNLOAD_URL"; \ - echo "$VALKEY_DOWNLOAD_SHA *valkey.tar.gz" | sha256sum -c -; \ mkdir -p /usr/src/valkey; \ tar -xzf valkey.tar.gz -C /usr/src/valkey --strip-components=1; \ rm valkey.tar.gz; \