From e42689e24fa459f8a417931a5cd6b22b9bf1f31c Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 8 Dec 2015 12:00:25 -0800 Subject: [PATCH 001/223] Update to 2.1.12 and 2.2.4 --- 2.1/Dockerfile | 2 +- 2.2/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 5b37e2b..0d9df8b 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -4,7 +4,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.1.11 +ENV CASSANDRA_VERSION 2.1.12 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 965cc83..21c02fc 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -4,7 +4,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.2.3 +ENV CASSANDRA_VERSION 2.2.4 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From 95facd11ffa7048dbde8cefa8b1847a1d6a613f3 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 8 Dec 2015 13:14:51 -0800 Subject: [PATCH 002/223] Update to 3.0.1 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 74f3ca9..3938002 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -4,7 +4,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.0 +ENV CASSANDRA_VERSION 3.0.1 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From 8daf9e78e24d741e37d8c9c2ee12ba2e70057c6e Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 21 Dec 2015 10:10:44 -0800 Subject: [PATCH 003/223] Update to 3.0.2 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 3938002..61fcc79 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -4,7 +4,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.1 +ENV CASSANDRA_VERSION 3.0.2 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From f61f8951219708e3d17819a0833db2927bc76330 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 30 Dec 2015 02:25:11 -0800 Subject: [PATCH 004/223] Add Cassandra 3.1 --- .travis.yml | 1 + 3.1/Dockerfile | 26 ++++++++++++++++ 3.1/docker-entrypoint.sh | 57 +++++++++++++++++++++++++++++++++++ generate-stackbrew-library.sh | 2 +- 4 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 3.1/Dockerfile create mode 100755 3.1/docker-entrypoint.sh diff --git a/.travis.yml b/.travis.yml index b17576a..dd156a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: bash services: docker env: + - VERSION=3.1 - VERSION=3.0 - VERSION=2.2 - VERSION=2.1 diff --git a/3.1/Dockerfile b/3.1/Dockerfile new file mode 100644 index 0000000..6779a54 --- /dev/null +++ b/3.1/Dockerfile @@ -0,0 +1,26 @@ +FROM debian:jessie-backports + +RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C + +RUN echo 'deb http://www.apache.org/dist/cassandra/debian 31x main' >> /etc/apt/sources.list.d/cassandra.list + +ENV CASSANDRA_VERSION 3.1.1 + +RUN apt-get update \ + && apt-get install -y cassandra="$CASSANDRA_VERSION" \ + && rm -rf /var/lib/apt/lists/* + +ENV CASSANDRA_CONFIG /etc/cassandra + +COPY docker-entrypoint.sh /docker-entrypoint.sh +ENTRYPOINT ["/docker-entrypoint.sh"] + +VOLUME /var/lib/cassandra + +# 7000: intra-node communication +# 7001: TLS intra-node communication +# 7199: JMX +# 9042: CQL +# 9160: thrift service +EXPOSE 7000 7001 7199 9042 9160 +CMD ["cassandra", "-f"] diff --git a/3.1/docker-entrypoint.sh b/3.1/docker-entrypoint.sh new file mode 100755 index 0000000..31fd2a0 --- /dev/null +++ b/3.1/docker-entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -e + +# first arg is `-f` or `--some-option` +if [ "${1:0:1}" = '-' ]; then + set -- cassandra -f "$@" +fi + +if [ "$1" = 'cassandra' ]; then + : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} + + : ${CASSANDRA_LISTEN_ADDRESS='auto'} + if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then + CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" + fi + + : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} + + if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then + CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" + fi + : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} + + if [ -n "${CASSANDRA_NAME:+1}" ]; then + : ${CASSANDRA_SEEDS:="cassandra"} + fi + : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} + + sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + + for yaml in \ + broadcast_address \ + broadcast_rpc_address \ + cluster_name \ + endpoint_snitch \ + listen_address \ + num_tokens \ + rpc_address \ + start_rpc \ + ; do + var="CASSANDRA_${yaml^^}" + val="${!var}" + if [ "$val" ]; then + sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" + fi + done + + for rackdc in dc rack; do + var="CASSANDRA_${rackdc^^}" + val="${!var}" + if [ "$val" ]; then + sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" + fi + done +fi + +exec "$@" diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 4f710f7..5861b32 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -4,7 +4,7 @@ set -e declare -A aliases aliases=( [2.2]='2' - [3.0]='3 latest' + [3.1]='3 latest' ) cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From 587225220a41eb01375a4441f2d17d46925bf8ef Mon Sep 17 00:00:00 2001 From: Wolfgang Gerlach Date: Tue, 26 Jan 2016 10:47:08 -0600 Subject: [PATCH 005/223] add version 3.2 --- 3.2/Dockerfile | 26 ++++++++++++++++++ 3.2/docker-entrypoint.sh | 57 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 3.2/Dockerfile create mode 100755 3.2/docker-entrypoint.sh diff --git a/3.2/Dockerfile b/3.2/Dockerfile new file mode 100644 index 0000000..f09c8cb --- /dev/null +++ b/3.2/Dockerfile @@ -0,0 +1,26 @@ +FROM debian:jessie-backports + +RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C + +RUN echo 'deb http://www.apache.org/dist/cassandra/debian 32x main' >> /etc/apt/sources.list.d/cassandra.list + +ENV CASSANDRA_VERSION 3.2 + +RUN apt-get update \ + && apt-get install -y cassandra="$CASSANDRA_VERSION" \ + && rm -rf /var/lib/apt/lists/* + +ENV CASSANDRA_CONFIG /etc/cassandra + +COPY docker-entrypoint.sh /docker-entrypoint.sh +ENTRYPOINT ["/docker-entrypoint.sh"] + +VOLUME /var/lib/cassandra + +# 7000: intra-node communication +# 7001: TLS intra-node communication +# 7199: JMX +# 9042: CQL +# 9160: thrift service +EXPOSE 7000 7001 7199 9042 9160 +CMD ["cassandra", "-f"] diff --git a/3.2/docker-entrypoint.sh b/3.2/docker-entrypoint.sh new file mode 100755 index 0000000..31fd2a0 --- /dev/null +++ b/3.2/docker-entrypoint.sh @@ -0,0 +1,57 @@ +#!/bin/bash +set -e + +# first arg is `-f` or `--some-option` +if [ "${1:0:1}" = '-' ]; then + set -- cassandra -f "$@" +fi + +if [ "$1" = 'cassandra' ]; then + : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} + + : ${CASSANDRA_LISTEN_ADDRESS='auto'} + if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then + CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" + fi + + : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} + + if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then + CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" + fi + : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} + + if [ -n "${CASSANDRA_NAME:+1}" ]; then + : ${CASSANDRA_SEEDS:="cassandra"} + fi + : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} + + sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + + for yaml in \ + broadcast_address \ + broadcast_rpc_address \ + cluster_name \ + endpoint_snitch \ + listen_address \ + num_tokens \ + rpc_address \ + start_rpc \ + ; do + var="CASSANDRA_${yaml^^}" + val="${!var}" + if [ "$val" ]; then + sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" + fi + done + + for rackdc in dc rack; do + var="CASSANDRA_${rackdc^^}" + val="${!var}" + if [ "$val" ]; then + sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" + fi + done +fi + +exec "$@" From b10597115acd947cf81cc310992dc3f2d0ceeb88 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 26 Jan 2016 09:34:03 -0800 Subject: [PATCH 006/223] Modify update.sh to be slightly more robust in parsing the "Packages" file from upstream --- .travis.yml | 1 + update.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dd156a5..2f14e38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: bash services: docker env: + - VERSION=3.2 - VERSION=3.1 - VERSION=3.0 - VERSION=2.2 diff --git a/update.sh b/update.sh index f2b2368..bcc3296 100755 --- a/update.sh +++ b/update.sh @@ -14,7 +14,7 @@ travisEnv= for version in "${versions[@]}"; do dist="${version//./}" packagesUrl="http://www.apache.org/dist/cassandra/debian/dists/${dist}x/main/binary-amd64/Packages.gz" - fullVersion="$(curl -fsSL "$packagesUrl" | gunzip | grep -m1 -A10 "^Package: cassandra\$" | grep -m1 '^Version: ' | cut -d' ' -f2)" + fullVersion="$(curl -fsSL "$packagesUrl" | gunzip | awk -F ': ' '$1 == "Package" { pkg = $2 } pkg == "cassandra" && $1 == "Version" { print $2 }')" ( set -x From 477e34e70df334b71d65d3da513cfd8824d996dd Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 26 Jan 2016 09:37:30 -0800 Subject: [PATCH 007/223] Update latest --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 5861b32..13360d0 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -4,7 +4,7 @@ set -e declare -A aliases aliases=( [2.2]='2' - [3.1]='3 latest' + [3.2]='3 latest' ) cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From d8595fb29eec2038ff98505e66ee1757d94fe423 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 26 Jan 2016 09:43:58 -0800 Subject: [PATCH 008/223] Fix duplicates --- generate-stackbrew-library.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 13360d0..bab0da7 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -18,7 +18,11 @@ echo '# maintainer: InfoSiftr (@infosiftr)' for version in "${versions[@]}"; do commit="$(cd "$version" && git log -1 --format='format:%H' -- Dockerfile $(awk 'toupper($1) == "COPY" { for (i = 2; i < NF; i++) { print $i } }' Dockerfile))" fullVersion="$(grep -m1 'ENV CASSANDRA_VERSION ' "$version/Dockerfile" | cut -d' ' -f3 | cut -d- -f1)" - versionAliases=( $fullVersion $version ${aliases[$version]} ) + versionAliases=( $fullVersion ) + if [ "$version" != "$fullVersion" ]; then + versionAliases+=( $version ) + fi + versionAliases+=( ${aliases[$version]} ) echo for va in "${versionAliases[@]}"; do From e57caf5f7dc58160846753096016f81224bc0a80 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 26 Jan 2016 12:29:07 -0800 Subject: [PATCH 009/223] Run as non-root by default (and allow arbitrary --user values) --- 2.1/Dockerfile | 17 +++++++++++++++++ 2.1/docker-entrypoint.sh | 6 ++++++ 2.2/Dockerfile | 17 +++++++++++++++++ 2.2/docker-entrypoint.sh | 6 ++++++ 3.0/Dockerfile | 17 +++++++++++++++++ 3.0/docker-entrypoint.sh | 6 ++++++ 3.1/Dockerfile | 17 +++++++++++++++++ 3.1/docker-entrypoint.sh | 6 ++++++ 3.2/Dockerfile | 17 +++++++++++++++++ 3.2/docker-entrypoint.sh | 6 ++++++ Dockerfile.template | 17 +++++++++++++++++ docker-entrypoint.sh | 6 ++++++ 12 files changed, 138 insertions(+) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 0d9df8b..f1e06b5 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -1,5 +1,19 @@ +# vim:set ft=dockerfile: FROM debian:jessie-backports +# explicitly set user/group IDs +RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra + +# grab gosu for easy step-down from root +RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ + && gpg --verify /usr/local/bin/gosu.asc \ + && rm /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu \ + && apt-get purge -y --auto-remove ca-certificates wget + RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C RUN echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' >> /etc/apt/sources.list.d/cassandra.list @@ -15,6 +29,9 @@ ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] +RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" VOLUME /var/lib/cassandra # 7000: intra-node communication diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh index 31fd2a0..c34d728 100755 --- a/2.1/docker-entrypoint.sh +++ b/2.1/docker-entrypoint.sh @@ -6,6 +6,12 @@ if [ "${1:0:1}" = '-' ]; then set -- cassandra -f "$@" fi +# allow the container to be started with `--user` +if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then + chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + exec gosu cassandra "$BASH_SOURCE" "$@" +fi + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 21c02fc..999f8d9 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -1,5 +1,19 @@ +# vim:set ft=dockerfile: FROM debian:jessie-backports +# explicitly set user/group IDs +RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra + +# grab gosu for easy step-down from root +RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ + && gpg --verify /usr/local/bin/gosu.asc \ + && rm /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu \ + && apt-get purge -y --auto-remove ca-certificates wget + RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C RUN echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' >> /etc/apt/sources.list.d/cassandra.list @@ -15,6 +29,9 @@ ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] +RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" VOLUME /var/lib/cassandra # 7000: intra-node communication diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh index 31fd2a0..c34d728 100755 --- a/2.2/docker-entrypoint.sh +++ b/2.2/docker-entrypoint.sh @@ -6,6 +6,12 @@ if [ "${1:0:1}" = '-' ]; then set -- cassandra -f "$@" fi +# allow the container to be started with `--user` +if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then + chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + exec gosu cassandra "$BASH_SOURCE" "$@" +fi + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 61fcc79..0d67e5e 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -1,5 +1,19 @@ +# vim:set ft=dockerfile: FROM debian:jessie-backports +# explicitly set user/group IDs +RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra + +# grab gosu for easy step-down from root +RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ + && gpg --verify /usr/local/bin/gosu.asc \ + && rm /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu \ + && apt-get purge -y --auto-remove ca-certificates wget + RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list @@ -15,6 +29,9 @@ ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] +RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" VOLUME /var/lib/cassandra # 7000: intra-node communication diff --git a/3.0/docker-entrypoint.sh b/3.0/docker-entrypoint.sh index 31fd2a0..c34d728 100755 --- a/3.0/docker-entrypoint.sh +++ b/3.0/docker-entrypoint.sh @@ -6,6 +6,12 @@ if [ "${1:0:1}" = '-' ]; then set -- cassandra -f "$@" fi +# allow the container to be started with `--user` +if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then + chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + exec gosu cassandra "$BASH_SOURCE" "$@" +fi + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} diff --git a/3.1/Dockerfile b/3.1/Dockerfile index 6779a54..7dc81c6 100644 --- a/3.1/Dockerfile +++ b/3.1/Dockerfile @@ -1,5 +1,19 @@ +# vim:set ft=dockerfile: FROM debian:jessie-backports +# explicitly set user/group IDs +RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra + +# grab gosu for easy step-down from root +RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ + && gpg --verify /usr/local/bin/gosu.asc \ + && rm /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu \ + && apt-get purge -y --auto-remove ca-certificates wget + RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C RUN echo 'deb http://www.apache.org/dist/cassandra/debian 31x main' >> /etc/apt/sources.list.d/cassandra.list @@ -15,6 +29,9 @@ ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] +RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" VOLUME /var/lib/cassandra # 7000: intra-node communication diff --git a/3.1/docker-entrypoint.sh b/3.1/docker-entrypoint.sh index 31fd2a0..c34d728 100755 --- a/3.1/docker-entrypoint.sh +++ b/3.1/docker-entrypoint.sh @@ -6,6 +6,12 @@ if [ "${1:0:1}" = '-' ]; then set -- cassandra -f "$@" fi +# allow the container to be started with `--user` +if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then + chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + exec gosu cassandra "$BASH_SOURCE" "$@" +fi + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} diff --git a/3.2/Dockerfile b/3.2/Dockerfile index f09c8cb..ddfc997 100644 --- a/3.2/Dockerfile +++ b/3.2/Dockerfile @@ -1,5 +1,19 @@ +# vim:set ft=dockerfile: FROM debian:jessie-backports +# explicitly set user/group IDs +RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra + +# grab gosu for easy step-down from root +RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ + && gpg --verify /usr/local/bin/gosu.asc \ + && rm /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu \ + && apt-get purge -y --auto-remove ca-certificates wget + RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C RUN echo 'deb http://www.apache.org/dist/cassandra/debian 32x main' >> /etc/apt/sources.list.d/cassandra.list @@ -15,6 +29,9 @@ ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] +RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" VOLUME /var/lib/cassandra # 7000: intra-node communication diff --git a/3.2/docker-entrypoint.sh b/3.2/docker-entrypoint.sh index 31fd2a0..c34d728 100755 --- a/3.2/docker-entrypoint.sh +++ b/3.2/docker-entrypoint.sh @@ -6,6 +6,12 @@ if [ "${1:0:1}" = '-' ]; then set -- cassandra -f "$@" fi +# allow the container to be started with `--user` +if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then + chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + exec gosu cassandra "$BASH_SOURCE" "$@" +fi + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} diff --git a/Dockerfile.template b/Dockerfile.template index f9f4686..526d61d 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,5 +1,19 @@ +# vim:set ft=dockerfile: FROM debian:jessie-backports +# explicitly set user/group IDs +RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra + +# grab gosu for easy step-down from root +RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ + && gpg --verify /usr/local/bin/gosu.asc \ + && rm /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu \ + && apt-get purge -y --auto-remove ca-certificates wget + RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C RUN echo 'deb http://www.apache.org/dist/cassandra/debian %%CASSANDRA_DIST%%x main' >> /etc/apt/sources.list.d/cassandra.list @@ -15,6 +29,9 @@ ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] +RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" VOLUME /var/lib/cassandra # 7000: intra-node communication diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 31fd2a0..c34d728 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -6,6 +6,12 @@ if [ "${1:0:1}" = '-' ]; then set -- cassandra -f "$@" fi +# allow the container to be started with `--user` +if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then + chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + exec gosu cassandra "$BASH_SOURCE" "$@" +fi + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} From 453a8dff57e4a34a3c12d8800d307483e877a531 Mon Sep 17 00:00:00 2001 From: ltagliamonte Date: Mon, 8 Feb 2016 15:53:49 -0800 Subject: [PATCH 010/223] chown cassandra logs folder --- 2.1/docker-entrypoint.sh | 2 +- 2.2/docker-entrypoint.sh | 2 +- 3.0/docker-entrypoint.sh | 2 +- 3.1/docker-entrypoint.sh | 2 +- 3.2/docker-entrypoint.sh | 2 +- docker-entrypoint.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh index c34d728..351198b 100755 --- a/2.1/docker-entrypoint.sh +++ b/2.1/docker-entrypoint.sh @@ -8,7 +8,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" exec gosu cassandra "$BASH_SOURCE" "$@" fi diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh index c34d728..351198b 100755 --- a/2.2/docker-entrypoint.sh +++ b/2.2/docker-entrypoint.sh @@ -8,7 +8,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" exec gosu cassandra "$BASH_SOURCE" "$@" fi diff --git a/3.0/docker-entrypoint.sh b/3.0/docker-entrypoint.sh index c34d728..351198b 100755 --- a/3.0/docker-entrypoint.sh +++ b/3.0/docker-entrypoint.sh @@ -8,7 +8,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" exec gosu cassandra "$BASH_SOURCE" "$@" fi diff --git a/3.1/docker-entrypoint.sh b/3.1/docker-entrypoint.sh index c34d728..351198b 100755 --- a/3.1/docker-entrypoint.sh +++ b/3.1/docker-entrypoint.sh @@ -8,7 +8,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" exec gosu cassandra "$BASH_SOURCE" "$@" fi diff --git a/3.2/docker-entrypoint.sh b/3.2/docker-entrypoint.sh index c34d728..351198b 100755 --- a/3.2/docker-entrypoint.sh +++ b/3.2/docker-entrypoint.sh @@ -8,7 +8,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" exec gosu cassandra "$BASH_SOURCE" "$@" fi diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index c34d728..351198b 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -8,7 +8,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" exec gosu cassandra "$BASH_SOURCE" "$@" fi From d0a316423d957077b59f5d37ace76b5f4cc84a4c Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 15 Feb 2016 12:20:15 -0800 Subject: [PATCH 011/223] Update to 2.1.13, 2.2.5, and 3.0.3 (the three that aren't broken ATM) --- 2.1/Dockerfile | 2 +- 2.2/Dockerfile | 2 +- 3.0/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index f1e06b5..310835e 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -18,7 +18,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.1.12 +ENV CASSANDRA_VERSION 2.1.13 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 999f8d9..56383f7 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -18,7 +18,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.2.4 +ENV CASSANDRA_VERSION 2.2.5 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 0d67e5e..512f72d 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -18,7 +18,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.2 +ENV CASSANDRA_VERSION 3.0.3 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From 13a08c6fb1f02a68060d632ac75b2caed92500e7 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 15 Feb 2016 12:37:17 -0800 Subject: [PATCH 012/223] Add 3.3 and update "latest" --- .travis.yml | 1 + 3.3/Dockerfile | 43 ++++++++++++++++++++++++ 3.3/docker-entrypoint.sh | 63 +++++++++++++++++++++++++++++++++++ generate-stackbrew-library.sh | 2 +- 4 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 3.3/Dockerfile create mode 100755 3.3/docker-entrypoint.sh diff --git a/.travis.yml b/.travis.yml index 2f14e38..6a493cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: bash services: docker env: + - VERSION=3.3 - VERSION=3.2 - VERSION=3.1 - VERSION=3.0 diff --git a/3.3/Dockerfile b/3.3/Dockerfile new file mode 100644 index 0000000..0aa5fcc --- /dev/null +++ b/3.3/Dockerfile @@ -0,0 +1,43 @@ +# vim:set ft=dockerfile: +FROM debian:jessie-backports + +# explicitly set user/group IDs +RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra + +# grab gosu for easy step-down from root +RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ + && gpg --verify /usr/local/bin/gosu.asc \ + && rm /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu \ + && apt-get purge -y --auto-remove ca-certificates wget + +RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C + +RUN echo 'deb http://www.apache.org/dist/cassandra/debian 33x main' >> /etc/apt/sources.list.d/cassandra.list + +ENV CASSANDRA_VERSION 3.3 + +RUN apt-get update \ + && apt-get install -y cassandra="$CASSANDRA_VERSION" \ + && rm -rf /var/lib/apt/lists/* + +ENV CASSANDRA_CONFIG /etc/cassandra + +COPY docker-entrypoint.sh /docker-entrypoint.sh +ENTRYPOINT ["/docker-entrypoint.sh"] + +RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" +VOLUME /var/lib/cassandra + +# 7000: intra-node communication +# 7001: TLS intra-node communication +# 7199: JMX +# 9042: CQL +# 9160: thrift service +EXPOSE 7000 7001 7199 9042 9160 +CMD ["cassandra", "-f"] diff --git a/3.3/docker-entrypoint.sh b/3.3/docker-entrypoint.sh new file mode 100755 index 0000000..c34d728 --- /dev/null +++ b/3.3/docker-entrypoint.sh @@ -0,0 +1,63 @@ +#!/bin/bash +set -e + +# first arg is `-f` or `--some-option` +if [ "${1:0:1}" = '-' ]; then + set -- cassandra -f "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then + chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + exec gosu cassandra "$BASH_SOURCE" "$@" +fi + +if [ "$1" = 'cassandra' ]; then + : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} + + : ${CASSANDRA_LISTEN_ADDRESS='auto'} + if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then + CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" + fi + + : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} + + if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then + CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" + fi + : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} + + if [ -n "${CASSANDRA_NAME:+1}" ]; then + : ${CASSANDRA_SEEDS:="cassandra"} + fi + : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} + + sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + + for yaml in \ + broadcast_address \ + broadcast_rpc_address \ + cluster_name \ + endpoint_snitch \ + listen_address \ + num_tokens \ + rpc_address \ + start_rpc \ + ; do + var="CASSANDRA_${yaml^^}" + val="${!var}" + if [ "$val" ]; then + sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" + fi + done + + for rackdc in dc rack; do + var="CASSANDRA_${rackdc^^}" + val="${!var}" + if [ "$val" ]; then + sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" + fi + done +fi + +exec "$@" diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index bab0da7..8c749aa 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -4,7 +4,7 @@ set -e declare -A aliases aliases=( [2.2]='2' - [3.2]='3 latest' + [3.3]='3 latest' ) cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From 59ea86ef4380e2ad76f0b7a3c46019046b445ada Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Tue, 9 Feb 2016 15:01:57 -0800 Subject: [PATCH 013/223] Run update.sh --- 3.2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.2/Dockerfile b/3.2/Dockerfile index ddfc997..6d31421 100644 --- a/3.2/Dockerfile +++ b/3.2/Dockerfile @@ -18,7 +18,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 32x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.2 +ENV CASSANDRA_VERSION 3.2.1 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From d93f3ec5c720277d9258a5bf3cbc24fe0e800fba Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 26 Feb 2016 15:44:34 -0800 Subject: [PATCH 014/223] Run update.sh --- 3.3/docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.3/docker-entrypoint.sh b/3.3/docker-entrypoint.sh index c34d728..351198b 100755 --- a/3.3/docker-entrypoint.sh +++ b/3.3/docker-entrypoint.sh @@ -8,7 +8,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" + chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" exec gosu cassandra "$BASH_SOURCE" "$@" fi From 90ba62c6d8859abc5f38a6d47c9da0661be04171 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 26 Feb 2016 16:17:38 -0800 Subject: [PATCH 015/223] Fix "gpg" usage to stop relying on deprecated and insecure behavior --- 2.1/Dockerfile | 16 ++++++++++------ 2.2/Dockerfile | 16 ++++++++++------ 3.0/Dockerfile | 16 ++++++++++------ 3.1/Dockerfile | 16 ++++++++++------ 3.2/Dockerfile | 16 ++++++++++------ 3.3/Dockerfile | 16 ++++++++++------ Dockerfile.template | 16 ++++++++++------ 7 files changed, 70 insertions(+), 42 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 310835e..0928ce1 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -5,13 +5,17 @@ FROM debian:jessie-backports RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra # grab gosu for easy step-down from root -RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ - && gpg --verify /usr/local/bin/gosu.asc \ - && rm /usr/local/bin/gosu.asc \ +ENV GOSU_VERSION 1.7 +RUN set -x \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ + && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 56383f7..1891944 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -5,13 +5,17 @@ FROM debian:jessie-backports RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra # grab gosu for easy step-down from root -RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ - && gpg --verify /usr/local/bin/gosu.asc \ - && rm /usr/local/bin/gosu.asc \ +ENV GOSU_VERSION 1.7 +RUN set -x \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ + && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 512f72d..7a3abcf 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -5,13 +5,17 @@ FROM debian:jessie-backports RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra # grab gosu for easy step-down from root -RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ - && gpg --verify /usr/local/bin/gosu.asc \ - && rm /usr/local/bin/gosu.asc \ +ENV GOSU_VERSION 1.7 +RUN set -x \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ + && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C diff --git a/3.1/Dockerfile b/3.1/Dockerfile index 7dc81c6..d7e1abd 100644 --- a/3.1/Dockerfile +++ b/3.1/Dockerfile @@ -5,13 +5,17 @@ FROM debian:jessie-backports RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra # grab gosu for easy step-down from root -RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ - && gpg --verify /usr/local/bin/gosu.asc \ - && rm /usr/local/bin/gosu.asc \ +ENV GOSU_VERSION 1.7 +RUN set -x \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ + && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C diff --git a/3.2/Dockerfile b/3.2/Dockerfile index 6d31421..5d50ec1 100644 --- a/3.2/Dockerfile +++ b/3.2/Dockerfile @@ -5,13 +5,17 @@ FROM debian:jessie-backports RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra # grab gosu for easy step-down from root -RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ - && gpg --verify /usr/local/bin/gosu.asc \ - && rm /usr/local/bin/gosu.asc \ +ENV GOSU_VERSION 1.7 +RUN set -x \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ + && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C diff --git a/3.3/Dockerfile b/3.3/Dockerfile index 0aa5fcc..d50d7c3 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -5,13 +5,17 @@ FROM debian:jessie-backports RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra # grab gosu for easy step-down from root -RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ - && gpg --verify /usr/local/bin/gosu.asc \ - && rm /usr/local/bin/gosu.asc \ +ENV GOSU_VERSION 1.7 +RUN set -x \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ + && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C diff --git a/Dockerfile.template b/Dockerfile.template index 526d61d..a686fe3 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -5,13 +5,17 @@ FROM debian:jessie-backports RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra # grab gosu for easy step-down from root -RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \ - && gpg --verify /usr/local/bin/gosu.asc \ - && rm /usr/local/bin/gosu.asc \ +ENV GOSU_VERSION 1.7 +RUN set -x \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ + && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C From 952709b74d43657bd19b131f81364386edc5e373 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 8 Mar 2016 13:16:59 -0800 Subject: [PATCH 016/223] Update to 3.0.4 --- 3.0/Dockerfile | 2 +- update.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 7a3abcf..ec33b79 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -22,7 +22,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.3 +ENV CASSANDRA_VERSION 3.0.4 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ diff --git a/update.sh b/update.sh index bcc3296..6af190d 100755 --- a/update.sh +++ b/update.sh @@ -9,7 +9,6 @@ if [ ${#versions[@]} -eq 0 ]; then fi versions=( "${versions[@]%/}" ) - travisEnv= for version in "${versions[@]}"; do dist="${version//./}" From a7fb4a13b7ed26cd7f2e704f07e4fad994d0bf39 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 11 Apr 2016 12:02:12 -0700 Subject: [PATCH 017/223] Update to 3.0.5 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index ec33b79..0eb95f2 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -22,7 +22,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.4 +ENV CASSANDRA_VERSION 3.0.5 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From 5c83501c904b0c514ae1e071d84107907e64df95 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 26 Apr 2016 14:13:14 -0700 Subject: [PATCH 018/223] Update to 2.2.6 and 2.1.14 --- 2.1/Dockerfile | 2 +- 2.2/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 0928ce1..ac7dde7 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -22,7 +22,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.1.13 +ENV CASSANDRA_VERSION 2.1.14 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 1891944..e19e23a 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -22,7 +22,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.2.5 +ENV CASSANDRA_VERSION 2.2.6 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From da46a4ade64310d505d23bfe791b288474e9516e Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 26 Apr 2016 14:38:10 -0700 Subject: [PATCH 019/223] Fix embarassing README.md typo (https://github.com/docker-library/docs/pull/557) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aca14ce..deafe2d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is the Git repo of the Docker [official image](https://docs.docker.com/docker-hub/official_repos/) for [cassandra](https://registry.hub.docker.com/_/cassandra/). See [the Docker Hub page](https://registry.hub.docker.com/_/cassandra/) for the full readme on how to use this Docker image and for information regarding contributing and issues. -The full readme is generated over in [docker-library/docs](https://github.com/docker-library/docs), specificially in [docker-library/docs/cassandra](https://github.com/docker-library/docs/tree/master/cassandra). +The full readme is generated over in [docker-library/docs](https://github.com/docker-library/docs), specifically in [docker-library/docs/cassandra](https://github.com/docker-library/docs/tree/master/cassandra). See a change merged here that doesn't show up on the Docker Hub yet? Check [the "library/cassandra" manifest file in the docker-library/official-images repo](https://github.com/docker-library/official-images/blob/master/library/cassandra), especially [PRs with the "library/cassandra" label on that repo](https://github.com/docker-library/official-images/labels/library%2Fcassandra). For more information about the official images process, see the [docker-library/official-images readme](https://github.com/docker-library/official-images/blob/master/README.md). From 9b1621101f1535a0f795da157bb25ae811563713 Mon Sep 17 00:00:00 2001 From: Antoine Toulme Date: Wed, 27 Apr 2016 18:20:36 -0700 Subject: [PATCH 020/223] Support for Cassandra 3.5 --- .travis.yml | 1 + 3.5/Dockerfile | 47 ++++++++++++++++++++++++++ 3.5/docker-entrypoint.sh | 63 +++++++++++++++++++++++++++++++++++ generate-stackbrew-library.sh | 2 +- 4 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 3.5/Dockerfile create mode 100755 3.5/docker-entrypoint.sh diff --git a/.travis.yml b/.travis.yml index 6a493cb..de67e0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: bash services: docker env: + - VERSION=3.5 - VERSION=3.3 - VERSION=3.2 - VERSION=3.1 diff --git a/3.5/Dockerfile b/3.5/Dockerfile new file mode 100644 index 0000000..8f0a617 --- /dev/null +++ b/3.5/Dockerfile @@ -0,0 +1,47 @@ +# vim:set ft=dockerfile: +FROM debian:jessie-backports + +# explicitly set user/group IDs +RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra + +# grab gosu for easy step-down from root +ENV GOSU_VERSION 1.7 +RUN set -x \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu \ + && gosu nobody true \ + && apt-get purge -y --auto-remove ca-certificates wget + +RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C + +RUN echo 'deb http://www.apache.org/dist/cassandra/debian 35x main' >> /etc/apt/sources.list.d/cassandra.list + +ENV CASSANDRA_VERSION 3.5 + +RUN apt-get update \ + && apt-get install -y cassandra="$CASSANDRA_VERSION" \ + && rm -rf /var/lib/apt/lists/* + +ENV CASSANDRA_CONFIG /etc/cassandra + +COPY docker-entrypoint.sh /docker-entrypoint.sh +ENTRYPOINT ["/docker-entrypoint.sh"] + +RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" +VOLUME /var/lib/cassandra + +# 7000: intra-node communication +# 7001: TLS intra-node communication +# 7199: JMX +# 9042: CQL +# 9160: thrift service +EXPOSE 7000 7001 7199 9042 9160 +CMD ["cassandra", "-f"] diff --git a/3.5/docker-entrypoint.sh b/3.5/docker-entrypoint.sh new file mode 100755 index 0000000..351198b --- /dev/null +++ b/3.5/docker-entrypoint.sh @@ -0,0 +1,63 @@ +#!/bin/bash +set -e + +# first arg is `-f` or `--some-option` +if [ "${1:0:1}" = '-' ]; then + set -- cassandra -f "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then + chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" + exec gosu cassandra "$BASH_SOURCE" "$@" +fi + +if [ "$1" = 'cassandra' ]; then + : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} + + : ${CASSANDRA_LISTEN_ADDRESS='auto'} + if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then + CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" + fi + + : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} + + if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then + CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" + fi + : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} + + if [ -n "${CASSANDRA_NAME:+1}" ]; then + : ${CASSANDRA_SEEDS:="cassandra"} + fi + : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} + + sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + + for yaml in \ + broadcast_address \ + broadcast_rpc_address \ + cluster_name \ + endpoint_snitch \ + listen_address \ + num_tokens \ + rpc_address \ + start_rpc \ + ; do + var="CASSANDRA_${yaml^^}" + val="${!var}" + if [ "$val" ]; then + sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" + fi + done + + for rackdc in dc rack; do + var="CASSANDRA_${rackdc^^}" + val="${!var}" + if [ "$val" ]; then + sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" + fi + done +fi + +exec "$@" diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 8c749aa..ed26167 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -4,7 +4,7 @@ set -e declare -A aliases aliases=( [2.2]='2' - [3.3]='3 latest' + [3.5]='3 latest' ) cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From 4af5513093383ade0f3a38ca4bb968f7111d6955 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 28 Apr 2016 10:21:58 -0700 Subject: [PATCH 021/223] Add 3.4 --- .travis.yml | 1 + 3.4/Dockerfile | 47 ++++++++++++++++++++++++++++++ 3.4/docker-entrypoint.sh | 63 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 3.4/Dockerfile create mode 100755 3.4/docker-entrypoint.sh diff --git a/.travis.yml b/.travis.yml index de67e0d..7559942 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ services: docker env: - VERSION=3.5 + - VERSION=3.4 - VERSION=3.3 - VERSION=3.2 - VERSION=3.1 diff --git a/3.4/Dockerfile b/3.4/Dockerfile new file mode 100644 index 0000000..b48304d --- /dev/null +++ b/3.4/Dockerfile @@ -0,0 +1,47 @@ +# vim:set ft=dockerfile: +FROM debian:jessie-backports + +# explicitly set user/group IDs +RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra + +# grab gosu for easy step-down from root +ENV GOSU_VERSION 1.7 +RUN set -x \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu \ + && gosu nobody true \ + && apt-get purge -y --auto-remove ca-certificates wget + +RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C + +RUN echo 'deb http://www.apache.org/dist/cassandra/debian 34x main' >> /etc/apt/sources.list.d/cassandra.list + +ENV CASSANDRA_VERSION 3.4 + +RUN apt-get update \ + && apt-get install -y cassandra="$CASSANDRA_VERSION" \ + && rm -rf /var/lib/apt/lists/* + +ENV CASSANDRA_CONFIG /etc/cassandra + +COPY docker-entrypoint.sh /docker-entrypoint.sh +ENTRYPOINT ["/docker-entrypoint.sh"] + +RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ + && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" +VOLUME /var/lib/cassandra + +# 7000: intra-node communication +# 7001: TLS intra-node communication +# 7199: JMX +# 9042: CQL +# 9160: thrift service +EXPOSE 7000 7001 7199 9042 9160 +CMD ["cassandra", "-f"] diff --git a/3.4/docker-entrypoint.sh b/3.4/docker-entrypoint.sh new file mode 100755 index 0000000..351198b --- /dev/null +++ b/3.4/docker-entrypoint.sh @@ -0,0 +1,63 @@ +#!/bin/bash +set -e + +# first arg is `-f` or `--some-option` +if [ "${1:0:1}" = '-' ]; then + set -- cassandra -f "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then + chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" + exec gosu cassandra "$BASH_SOURCE" "$@" +fi + +if [ "$1" = 'cassandra' ]; then + : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} + + : ${CASSANDRA_LISTEN_ADDRESS='auto'} + if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then + CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" + fi + + : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} + + if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then + CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" + fi + : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} + + if [ -n "${CASSANDRA_NAME:+1}" ]; then + : ${CASSANDRA_SEEDS:="cassandra"} + fi + : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} + + sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + + for yaml in \ + broadcast_address \ + broadcast_rpc_address \ + cluster_name \ + endpoint_snitch \ + listen_address \ + num_tokens \ + rpc_address \ + start_rpc \ + ; do + var="CASSANDRA_${yaml^^}" + val="${!var}" + if [ "$val" ]; then + sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" + fi + done + + for rackdc in dc rack; do + var="CASSANDRA_${rackdc^^}" + val="${!var}" + if [ "$val" ]; then + sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" + fi + done +fi + +exec "$@" From b1edfd288bc54c5eccbc19f8fd492b0bf518ed1b Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 28 Apr 2016 11:05:40 -0700 Subject: [PATCH 022/223] Add a hacky workaround for CASSANDRA-11661 See https://issues.apache.org/jira/browse/CASSANDRA-11661 --- 2.1/Dockerfile | 3 +++ 2.2/Dockerfile | 3 +++ 3.0/Dockerfile | 3 +++ 3.1/Dockerfile | 3 +++ 3.2/Dockerfile | 3 +++ 3.3/Dockerfile | 3 +++ 3.4/Dockerfile | 3 +++ 3.5/Dockerfile | 3 +++ Dockerfile.template | 3 +++ 9 files changed, 27 insertions(+) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index ac7dde7..dc1ced3 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -28,6 +28,9 @@ RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* +# https://issues.apache.org/jira/browse/CASSANDRA-11661 +RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh diff --git a/2.2/Dockerfile b/2.2/Dockerfile index e19e23a..418ab7f 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -28,6 +28,9 @@ RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* +# https://issues.apache.org/jira/browse/CASSANDRA-11661 +RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 0eb95f2..3589a08 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -28,6 +28,9 @@ RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* +# https://issues.apache.org/jira/browse/CASSANDRA-11661 +RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh diff --git a/3.1/Dockerfile b/3.1/Dockerfile index d7e1abd..2cf2f04 100644 --- a/3.1/Dockerfile +++ b/3.1/Dockerfile @@ -28,6 +28,9 @@ RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* +# https://issues.apache.org/jira/browse/CASSANDRA-11661 +RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh diff --git a/3.2/Dockerfile b/3.2/Dockerfile index 5d50ec1..6aec32b 100644 --- a/3.2/Dockerfile +++ b/3.2/Dockerfile @@ -28,6 +28,9 @@ RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* +# https://issues.apache.org/jira/browse/CASSANDRA-11661 +RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh diff --git a/3.3/Dockerfile b/3.3/Dockerfile index d50d7c3..eb17916 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -28,6 +28,9 @@ RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* +# https://issues.apache.org/jira/browse/CASSANDRA-11661 +RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh diff --git a/3.4/Dockerfile b/3.4/Dockerfile index b48304d..dea5464 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -28,6 +28,9 @@ RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* +# https://issues.apache.org/jira/browse/CASSANDRA-11661 +RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh diff --git a/3.5/Dockerfile b/3.5/Dockerfile index 8f0a617..1a28e0a 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -28,6 +28,9 @@ RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* +# https://issues.apache.org/jira/browse/CASSANDRA-11661 +RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh diff --git a/Dockerfile.template b/Dockerfile.template index a686fe3..97c097f 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -28,6 +28,9 @@ RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* +# https://issues.apache.org/jira/browse/CASSANDRA-11661 +RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ENV CASSANDRA_CONFIG /etc/cassandra COPY docker-entrypoint.sh /docker-entrypoint.sh From 409aaf9e5d41ad7d35b8f967179b02a7125ce3f1 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 28 Apr 2016 16:01:11 -0700 Subject: [PATCH 023/223] Remove 3.1, 3.2, 3.3, and 3.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The only releases listed as supported on https://cassandra.apache.org/download/ are 2.0, 2.1, 3.0, and 3.5. Additionally: > Even-numbered releases (e.g. 3.2) contain new features; odd-numbered releases (e.g. 3.3) contain bug fixes only. If a critical bug is found, a patch will be released against the most recent bug fix release. Also: (http://www.planetcassandra.org/blog/cassandra-2-2-3-0-and-beyond/) > Under normal conditions, we will NOT release 3.x.y stability releases for x > 0. That is, we will have a traditional 3.0.y stability series, but the odd-numbered bugfix-only releases will fill that role for the tick-tock series — recognizing that occasionally we will need to be flexible enough to release an emergency fix in the case of a critical bug or security vulnerability. --- .travis.yml | 4 --- 3.1/Dockerfile | 50 ------------------------------- 3.1/docker-entrypoint.sh | 63 ---------------------------------------- 3.2/Dockerfile | 50 ------------------------------- 3.2/docker-entrypoint.sh | 63 ---------------------------------------- 3.3/Dockerfile | 50 ------------------------------- 3.3/docker-entrypoint.sh | 63 ---------------------------------------- 3.4/Dockerfile | 50 ------------------------------- 3.4/docker-entrypoint.sh | 63 ---------------------------------------- 9 files changed, 456 deletions(-) delete mode 100644 3.1/Dockerfile delete mode 100755 3.1/docker-entrypoint.sh delete mode 100644 3.2/Dockerfile delete mode 100755 3.2/docker-entrypoint.sh delete mode 100644 3.3/Dockerfile delete mode 100755 3.3/docker-entrypoint.sh delete mode 100644 3.4/Dockerfile delete mode 100755 3.4/docker-entrypoint.sh diff --git a/.travis.yml b/.travis.yml index 7559942..9b9c472 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,6 @@ services: docker env: - VERSION=3.5 - - VERSION=3.4 - - VERSION=3.3 - - VERSION=3.2 - - VERSION=3.1 - VERSION=3.0 - VERSION=2.2 - VERSION=2.1 diff --git a/3.1/Dockerfile b/3.1/Dockerfile deleted file mode 100644 index 2cf2f04..0000000 --- a/3.1/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -# vim:set ft=dockerfile: -FROM debian:jessie-backports - -# explicitly set user/group IDs -RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra - -# grab gosu for easy step-down from root -ENV GOSU_VERSION 1.7 -RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ - && chmod +x /usr/local/bin/gosu \ - && gosu nobody true \ - && apt-get purge -y --auto-remove ca-certificates wget - -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C - -RUN echo 'deb http://www.apache.org/dist/cassandra/debian 31x main' >> /etc/apt/sources.list.d/cassandra.list - -ENV CASSANDRA_VERSION 3.1.1 - -RUN apt-get update \ - && apt-get install -y cassandra="$CASSANDRA_VERSION" \ - && rm -rf /var/lib/apt/lists/* - -# https://issues.apache.org/jira/browse/CASSANDRA-11661 -RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh - -ENV CASSANDRA_CONFIG /etc/cassandra - -COPY docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] - -RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" -VOLUME /var/lib/cassandra - -# 7000: intra-node communication -# 7001: TLS intra-node communication -# 7199: JMX -# 9042: CQL -# 9160: thrift service -EXPOSE 7000 7001 7199 9042 9160 -CMD ["cassandra", "-f"] diff --git a/3.1/docker-entrypoint.sh b/3.1/docker-entrypoint.sh deleted file mode 100755 index 351198b..0000000 --- a/3.1/docker-entrypoint.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -set -e - -# first arg is `-f` or `--some-option` -if [ "${1:0:1}" = '-' ]; then - set -- cassandra -f "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" - exec gosu cassandra "$BASH_SOURCE" "$@" -fi - -if [ "$1" = 'cassandra' ]; then - : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} - - : ${CASSANDRA_LISTEN_ADDRESS='auto'} - if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then - CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" - fi - - : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} - - if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then - CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" - fi - : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} - - if [ -n "${CASSANDRA_NAME:+1}" ]; then - : ${CASSANDRA_SEEDS:="cassandra"} - fi - : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - - sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" - - for yaml in \ - broadcast_address \ - broadcast_rpc_address \ - cluster_name \ - endpoint_snitch \ - listen_address \ - num_tokens \ - rpc_address \ - start_rpc \ - ; do - var="CASSANDRA_${yaml^^}" - val="${!var}" - if [ "$val" ]; then - sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" - fi - done - - for rackdc in dc rack; do - var="CASSANDRA_${rackdc^^}" - val="${!var}" - if [ "$val" ]; then - sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" - fi - done -fi - -exec "$@" diff --git a/3.2/Dockerfile b/3.2/Dockerfile deleted file mode 100644 index 6aec32b..0000000 --- a/3.2/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -# vim:set ft=dockerfile: -FROM debian:jessie-backports - -# explicitly set user/group IDs -RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra - -# grab gosu for easy step-down from root -ENV GOSU_VERSION 1.7 -RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ - && chmod +x /usr/local/bin/gosu \ - && gosu nobody true \ - && apt-get purge -y --auto-remove ca-certificates wget - -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C - -RUN echo 'deb http://www.apache.org/dist/cassandra/debian 32x main' >> /etc/apt/sources.list.d/cassandra.list - -ENV CASSANDRA_VERSION 3.2.1 - -RUN apt-get update \ - && apt-get install -y cassandra="$CASSANDRA_VERSION" \ - && rm -rf /var/lib/apt/lists/* - -# https://issues.apache.org/jira/browse/CASSANDRA-11661 -RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh - -ENV CASSANDRA_CONFIG /etc/cassandra - -COPY docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] - -RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" -VOLUME /var/lib/cassandra - -# 7000: intra-node communication -# 7001: TLS intra-node communication -# 7199: JMX -# 9042: CQL -# 9160: thrift service -EXPOSE 7000 7001 7199 9042 9160 -CMD ["cassandra", "-f"] diff --git a/3.2/docker-entrypoint.sh b/3.2/docker-entrypoint.sh deleted file mode 100755 index 351198b..0000000 --- a/3.2/docker-entrypoint.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -set -e - -# first arg is `-f` or `--some-option` -if [ "${1:0:1}" = '-' ]; then - set -- cassandra -f "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" - exec gosu cassandra "$BASH_SOURCE" "$@" -fi - -if [ "$1" = 'cassandra' ]; then - : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} - - : ${CASSANDRA_LISTEN_ADDRESS='auto'} - if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then - CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" - fi - - : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} - - if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then - CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" - fi - : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} - - if [ -n "${CASSANDRA_NAME:+1}" ]; then - : ${CASSANDRA_SEEDS:="cassandra"} - fi - : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - - sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" - - for yaml in \ - broadcast_address \ - broadcast_rpc_address \ - cluster_name \ - endpoint_snitch \ - listen_address \ - num_tokens \ - rpc_address \ - start_rpc \ - ; do - var="CASSANDRA_${yaml^^}" - val="${!var}" - if [ "$val" ]; then - sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" - fi - done - - for rackdc in dc rack; do - var="CASSANDRA_${rackdc^^}" - val="${!var}" - if [ "$val" ]; then - sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" - fi - done -fi - -exec "$@" diff --git a/3.3/Dockerfile b/3.3/Dockerfile deleted file mode 100644 index eb17916..0000000 --- a/3.3/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -# vim:set ft=dockerfile: -FROM debian:jessie-backports - -# explicitly set user/group IDs -RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra - -# grab gosu for easy step-down from root -ENV GOSU_VERSION 1.7 -RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ - && chmod +x /usr/local/bin/gosu \ - && gosu nobody true \ - && apt-get purge -y --auto-remove ca-certificates wget - -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C - -RUN echo 'deb http://www.apache.org/dist/cassandra/debian 33x main' >> /etc/apt/sources.list.d/cassandra.list - -ENV CASSANDRA_VERSION 3.3 - -RUN apt-get update \ - && apt-get install -y cassandra="$CASSANDRA_VERSION" \ - && rm -rf /var/lib/apt/lists/* - -# https://issues.apache.org/jira/browse/CASSANDRA-11661 -RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh - -ENV CASSANDRA_CONFIG /etc/cassandra - -COPY docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] - -RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" -VOLUME /var/lib/cassandra - -# 7000: intra-node communication -# 7001: TLS intra-node communication -# 7199: JMX -# 9042: CQL -# 9160: thrift service -EXPOSE 7000 7001 7199 9042 9160 -CMD ["cassandra", "-f"] diff --git a/3.3/docker-entrypoint.sh b/3.3/docker-entrypoint.sh deleted file mode 100755 index 351198b..0000000 --- a/3.3/docker-entrypoint.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -set -e - -# first arg is `-f` or `--some-option` -if [ "${1:0:1}" = '-' ]; then - set -- cassandra -f "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" - exec gosu cassandra "$BASH_SOURCE" "$@" -fi - -if [ "$1" = 'cassandra' ]; then - : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} - - : ${CASSANDRA_LISTEN_ADDRESS='auto'} - if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then - CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" - fi - - : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} - - if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then - CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" - fi - : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} - - if [ -n "${CASSANDRA_NAME:+1}" ]; then - : ${CASSANDRA_SEEDS:="cassandra"} - fi - : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - - sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" - - for yaml in \ - broadcast_address \ - broadcast_rpc_address \ - cluster_name \ - endpoint_snitch \ - listen_address \ - num_tokens \ - rpc_address \ - start_rpc \ - ; do - var="CASSANDRA_${yaml^^}" - val="${!var}" - if [ "$val" ]; then - sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" - fi - done - - for rackdc in dc rack; do - var="CASSANDRA_${rackdc^^}" - val="${!var}" - if [ "$val" ]; then - sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" - fi - done -fi - -exec "$@" diff --git a/3.4/Dockerfile b/3.4/Dockerfile deleted file mode 100644 index dea5464..0000000 --- a/3.4/Dockerfile +++ /dev/null @@ -1,50 +0,0 @@ -# vim:set ft=dockerfile: -FROM debian:jessie-backports - -# explicitly set user/group IDs -RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra - -# grab gosu for easy step-down from root -ENV GOSU_VERSION 1.7 -RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ - && chmod +x /usr/local/bin/gosu \ - && gosu nobody true \ - && apt-get purge -y --auto-remove ca-certificates wget - -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C - -RUN echo 'deb http://www.apache.org/dist/cassandra/debian 34x main' >> /etc/apt/sources.list.d/cassandra.list - -ENV CASSANDRA_VERSION 3.4 - -RUN apt-get update \ - && apt-get install -y cassandra="$CASSANDRA_VERSION" \ - && rm -rf /var/lib/apt/lists/* - -# https://issues.apache.org/jira/browse/CASSANDRA-11661 -RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh - -ENV CASSANDRA_CONFIG /etc/cassandra - -COPY docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] - -RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" -VOLUME /var/lib/cassandra - -# 7000: intra-node communication -# 7001: TLS intra-node communication -# 7199: JMX -# 9042: CQL -# 9160: thrift service -EXPOSE 7000 7001 7199 9042 9160 -CMD ["cassandra", "-f"] diff --git a/3.4/docker-entrypoint.sh b/3.4/docker-entrypoint.sh deleted file mode 100755 index 351198b..0000000 --- a/3.4/docker-entrypoint.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -set -e - -# first arg is `-f` or `--some-option` -if [ "${1:0:1}" = '-' ]; then - set -- cassandra -f "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" - exec gosu cassandra "$BASH_SOURCE" "$@" -fi - -if [ "$1" = 'cassandra' ]; then - : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} - - : ${CASSANDRA_LISTEN_ADDRESS='auto'} - if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then - CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" - fi - - : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} - - if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then - CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" - fi - : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} - - if [ -n "${CASSANDRA_NAME:+1}" ]; then - : ${CASSANDRA_SEEDS:="cassandra"} - fi - : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - - sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" - - for yaml in \ - broadcast_address \ - broadcast_rpc_address \ - cluster_name \ - endpoint_snitch \ - listen_address \ - num_tokens \ - rpc_address \ - start_rpc \ - ; do - var="CASSANDRA_${yaml^^}" - val="${!var}" - if [ "$val" ]; then - sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" - fi - done - - for rackdc in dc rack; do - var="CASSANDRA_${rackdc^^}" - val="${!var}" - if [ "$val" ]; then - sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" - fi - done -fi - -exec "$@" From 782f9e33512363dfcb39b32841669210badf32fb Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 16 May 2016 10:45:59 -0700 Subject: [PATCH 024/223] Update to 3.0.6 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 3589a08..32ffdb4 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -22,7 +22,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.5 +ENV CASSANDRA_VERSION 3.0.6 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From 5e291bb8fad37f2f29b8aadcc718f9a155152e92 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Tue, 8 Sep 2015 15:48:11 -0700 Subject: [PATCH 025/223] More aggressive on setting seeds --- 2.1/docker-entrypoint.sh | 2 +- 2.2/docker-entrypoint.sh | 2 +- 3.0/docker-entrypoint.sh | 2 +- docker-entrypoint.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh index 351198b..16d183a 100755 --- a/2.1/docker-entrypoint.sh +++ b/2.1/docker-entrypoint.sh @@ -32,7 +32,7 @@ if [ "$1" = 'cassandra' ]; then fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + sed -ri 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" for yaml in \ broadcast_address \ diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh index 351198b..16d183a 100755 --- a/2.2/docker-entrypoint.sh +++ b/2.2/docker-entrypoint.sh @@ -32,7 +32,7 @@ if [ "$1" = 'cassandra' ]; then fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + sed -ri 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" for yaml in \ broadcast_address \ diff --git a/3.0/docker-entrypoint.sh b/3.0/docker-entrypoint.sh index 351198b..16d183a 100755 --- a/3.0/docker-entrypoint.sh +++ b/3.0/docker-entrypoint.sh @@ -32,7 +32,7 @@ if [ "$1" = 'cassandra' ]; then fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + sed -ri 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" for yaml in \ broadcast_address \ diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 351198b..16d183a 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -32,7 +32,7 @@ if [ "$1" = 'cassandra' ]; then fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + sed -ri 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" for yaml in \ broadcast_address \ From e80d0efacc3097664483b7e5f6dd46cb002998ed Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 8 Jun 2016 15:42:30 -0700 Subject: [PATCH 026/223] Convert "generate-stackbrew-library.sh" to output the new 2822-based format --- generate-stackbrew-library.sh | 59 +++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index ed26167..4fedab9 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -eu declare -A aliases aliases=( @@ -7,25 +7,64 @@ aliases=( [3.5]='3 latest' ) +self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" versions=( */ ) versions=( "${versions[@]%/}" ) -url='git://github.com/docker-library/cassandra' -echo '# maintainer: InfoSiftr (@infosiftr)' +# get the most recent commit which modified any of "$@" +fileCommit() { + git log -1 --format='format:%H' HEAD -- "$@" +} + +# get the most recent commit which modified "$1/Dockerfile" or any file COPY'd from "$1/Dockerfile" +dirCommit() { + local dir="$1"; shift + ( + cd "$dir" + fileCommit \ + Dockerfile \ + $(git show HEAD:./Dockerfile | awk ' + toupper($1) == "COPY" { + for (i = 2; i < NF; i++) { + print $i + } + } + ') + ) +} + +cat <<-EOH +# this file is generated via https://github.com/docker-library/cassandra/blob/$(fileCommit "$self")/$self + +Maintainers: Tianon Gravi (@tianon), + Joseph Ferguson (@yosifkit) +GitRepo: https://github.com/docker-library/cassandra.git +EOH + +# prints "$2$1$3$1...$N" +join() { + local sep="$1"; shift + local out; printf -v out "${sep//%/%%}%s" "$@" + echo "${out#$sep}" +} for version in "${versions[@]}"; do - commit="$(cd "$version" && git log -1 --format='format:%H' -- Dockerfile $(awk 'toupper($1) == "COPY" { for (i = 2; i < NF; i++) { print $i } }' Dockerfile))" - fullVersion="$(grep -m1 'ENV CASSANDRA_VERSION ' "$version/Dockerfile" | cut -d' ' -f3 | cut -d- -f1)" + commit="$(dirCommit "$version")" + + fullVersion="$(git show "$commit":"$version/Dockerfile" | awk '$1 == "ENV" && $2 == "CASSANDRA_VERSION" { print $3; exit }')" + versionAliases=( $fullVersion ) if [ "$version" != "$fullVersion" ]; then versionAliases+=( $version ) fi - versionAliases+=( ${aliases[$version]} ) - + versionAliases+=( ${aliases[$version]:-} ) + echo - for va in "${versionAliases[@]}"; do - echo "$va: ${url}@${commit} $version" - done + cat <<-EOE + Tags: $(join ', ' "${versionAliases[@]}") + GitCommit: $commit + Directory: $version + EOE done From b50c3e856f4ca719546dce2de1b4f64a923fb766 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 9 Jun 2016 10:28:06 -0700 Subject: [PATCH 027/223] Simplify silly syntax --- generate-stackbrew-library.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 4fedab9..9c3139c 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,8 +1,7 @@ #!/bin/bash set -eu -declare -A aliases -aliases=( +declare -A aliases=( [2.2]='2' [3.5]='3 latest' ) From 0144b0ca0e2899f2628bfd0cb66f9dc68fb13ad5 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 9 Jun 2016 14:37:08 -0700 Subject: [PATCH 028/223] Run update.sh ... --- 3.5/docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.5/docker-entrypoint.sh b/3.5/docker-entrypoint.sh index 351198b..16d183a 100755 --- a/3.5/docker-entrypoint.sh +++ b/3.5/docker-entrypoint.sh @@ -32,7 +32,7 @@ if [ "$1" = 'cassandra' ]; then fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - sed -ri 's/(- seeds:) "127.0.0.1"/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + sed -ri 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" for yaml in \ broadcast_address \ From f387127a9bbf07439a09a95135936be42fc35277 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 14 Jun 2016 13:25:25 -0700 Subject: [PATCH 029/223] Update to 3.0.7 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 32ffdb4..21a6ffe 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -22,7 +22,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.6 +ENV CASSANDRA_VERSION 3.0.7 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From c3c26f2efdb9874dc5b3717662462e8ca0b2d944 Mon Sep 17 00:00:00 2001 From: Marc Zbyszynski Date: Wed, 15 Jun 2016 13:00:09 -0400 Subject: [PATCH 030/223] upgraded cassandra 3.5 to 3.7 --- .travis.yml | 2 +- {3.5 => 3.7}/Dockerfile | 4 ++-- {3.5 => 3.7}/docker-entrypoint.sh | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename {3.5 => 3.7}/Dockerfile (95%) rename {3.5 => 3.7}/docker-entrypoint.sh (100%) diff --git a/.travis.yml b/.travis.yml index 9b9c472..3cf5a70 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: bash services: docker env: - - VERSION=3.5 + - VERSION=3.7 - VERSION=3.0 - VERSION=2.2 - VERSION=2.1 diff --git a/3.5/Dockerfile b/3.7/Dockerfile similarity index 95% rename from 3.5/Dockerfile rename to 3.7/Dockerfile index 1a28e0a..071ffa6 100644 --- a/3.5/Dockerfile +++ b/3.7/Dockerfile @@ -20,9 +20,9 @@ RUN set -x \ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C -RUN echo 'deb http://www.apache.org/dist/cassandra/debian 35x main' >> /etc/apt/sources.list.d/cassandra.list +RUN echo 'deb http://www.apache.org/dist/cassandra/debian 37x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.5 +ENV CASSANDRA_VERSION 3.7 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ diff --git a/3.5/docker-entrypoint.sh b/3.7/docker-entrypoint.sh similarity index 100% rename from 3.5/docker-entrypoint.sh rename to 3.7/docker-entrypoint.sh From 63d112e0991f47710053e279a2030452e3313434 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 16 Jun 2016 11:59:06 -0700 Subject: [PATCH 031/223] Update latest to 3.7 --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 9c3139c..827cac7 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -3,7 +3,7 @@ set -eu declare -A aliases=( [2.2]='2' - [3.5]='3 latest' + [3.7]='3 latest' ) self="$(basename "$BASH_SOURCE")" From ef66ec669d3930aea018f74dc58f5bd2ef5df880 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 8 Jul 2016 11:24:13 -0700 Subject: [PATCH 032/223] Update to 3.0.8, 2.2.7, 2.1.15 --- 2.1/Dockerfile | 2 +- 2.2/Dockerfile | 2 +- 3.0/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index dc1ced3..e7b3f48 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -22,7 +22,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.1.14 +ENV CASSANDRA_VERSION 2.1.15 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 418ab7f..26552a7 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -22,7 +22,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.2.6 +ENV CASSANDRA_VERSION 2.2.7 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 21a6ffe..dd7068c 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -22,7 +22,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.7 +ENV CASSANDRA_VERSION 3.0.8 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From caf1d916f7ffaecef5685668a878495dc6222537 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 20 Sep 2016 07:24:11 -0700 Subject: [PATCH 033/223] Update to 3.0.9 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index dd7068c..c8d8e9f 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -22,7 +22,7 @@ RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57 RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.8 +ENV CASSANDRA_VERSION 3.0.9 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From 2278e3b1186f8d9a16252752163eebc9ce1a1a84 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 21 Sep 2016 13:20:34 -0700 Subject: [PATCH 034/223] Update README with Jenkins badge change (see https://github.com/docker-library/docs/pull/697) --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index deafe2d..31c718b 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,11 @@ The full readme is generated over in [docker-library/docs](https://github.com/do See a change merged here that doesn't show up on the Docker Hub yet? Check [the "library/cassandra" manifest file in the docker-library/official-images repo](https://github.com/docker-library/official-images/blob/master/library/cassandra), especially [PRs with the "library/cassandra" label on that repo](https://github.com/docker-library/official-images/labels/library%2Fcassandra). For more information about the official images process, see the [docker-library/official-images readme](https://github.com/docker-library/official-images/blob/master/README.md). -[![Travis CI](https://img.shields.io/travis/docker-library/cassandra/master.svg)](https://travis-ci.org/docker-library/cassandra/branches) +--- + +- [Travis CI: + ![build status badge](https://img.shields.io/travis/docker-library/cassandra/master.svg)](https://travis-ci.org/docker-library/cassandra/branches) +- [Automated `update.sh`: + ![build status badge](https://doi-janky.infosiftr.net/job/update.sh/job/cassandra/badge/icon)](https://doi-janky.infosiftr.net/job/update.sh/job/cassandra) From ef57ef961003e27469b86178f0b4d184bb64d82e Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 28 Sep 2016 14:15:36 -0700 Subject: [PATCH 035/223] Update APT GPG key --- 2.1/Dockerfile | 11 ++++++++++- 2.2/Dockerfile | 13 +++++++++++-- 3.0/Dockerfile | 11 ++++++++++- 3.7/Dockerfile | 11 ++++++++++- Dockerfile.template | 11 ++++++++++- 5 files changed, 51 insertions(+), 6 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index e7b3f48..0255502 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -18,7 +18,16 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C +# https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys +ENV GPG_KEYS \ +# gpg: key 0353B12C: public key "T Jake Luciani " imported + 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ +# gpg: key FE4B2BDA: public key "Michael Shuler " imported + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA +RUN set -ex \ + && for key in $GPG_KEYS; do \ + apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done RUN echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' >> /etc/apt/sources.list.d/cassandra.list diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 26552a7..bc5a585 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -18,11 +18,20 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C +# https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys +ENV GPG_KEYS \ +# gpg: key 0353B12C: public key "T Jake Luciani " imported + 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ +# gpg: key FE4B2BDA: public key "Michael Shuler " imported + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA +RUN set -ex \ + && for key in $GPG_KEYS; do \ + apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done RUN echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.2.7 +ENV CASSANDRA_VERSION 2.2.8 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ diff --git a/3.0/Dockerfile b/3.0/Dockerfile index c8d8e9f..bc28bac 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -18,7 +18,16 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C +# https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys +ENV GPG_KEYS \ +# gpg: key 0353B12C: public key "T Jake Luciani " imported + 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ +# gpg: key FE4B2BDA: public key "Michael Shuler " imported + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA +RUN set -ex \ + && for key in $GPG_KEYS; do \ + apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list diff --git a/3.7/Dockerfile b/3.7/Dockerfile index 071ffa6..4c33c7a 100644 --- a/3.7/Dockerfile +++ b/3.7/Dockerfile @@ -18,7 +18,16 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C +# https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys +ENV GPG_KEYS \ +# gpg: key 0353B12C: public key "T Jake Luciani " imported + 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ +# gpg: key FE4B2BDA: public key "Michael Shuler " imported + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA +RUN set -ex \ + && for key in $GPG_KEYS; do \ + apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done RUN echo 'deb http://www.apache.org/dist/cassandra/debian 37x main' >> /etc/apt/sources.list.d/cassandra.list diff --git a/Dockerfile.template b/Dockerfile.template index 97c097f..1ac27ef 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -18,7 +18,16 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 514A2AD631A57A16DD0047EC749D6EEC0353B12C +# https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys +ENV GPG_KEYS \ +# gpg: key 0353B12C: public key "T Jake Luciani " imported + 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ +# gpg: key FE4B2BDA: public key "Michael Shuler " imported + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA +RUN set -ex \ + && for key in $GPG_KEYS; do \ + apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done RUN echo 'deb http://www.apache.org/dist/cassandra/debian %%CASSANDRA_DIST%%x main' >> /etc/apt/sources.list.d/cassandra.list From ce8566d1ce825d2d0e16b2b0b76befed1defe62c Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Tue, 4 Oct 2016 17:00:44 -0700 Subject: [PATCH 036/223] Add 3.9 series, drop 3.7 --- .travis.yml | 2 +- {3.7 => 3.9}/Dockerfile | 4 ++-- {3.7 => 3.9}/docker-entrypoint.sh | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename {3.7 => 3.9}/Dockerfile (96%) rename {3.7 => 3.9}/docker-entrypoint.sh (100%) diff --git a/.travis.yml b/.travis.yml index 3cf5a70..2c7be9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: bash services: docker env: - - VERSION=3.7 + - VERSION=3.9 - VERSION=3.0 - VERSION=2.2 - VERSION=2.1 diff --git a/3.7/Dockerfile b/3.9/Dockerfile similarity index 96% rename from 3.7/Dockerfile rename to 3.9/Dockerfile index 4c33c7a..1e28278 100644 --- a/3.7/Dockerfile +++ b/3.9/Dockerfile @@ -29,9 +29,9 @@ RUN set -ex \ apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done -RUN echo 'deb http://www.apache.org/dist/cassandra/debian 37x main' >> /etc/apt/sources.list.d/cassandra.list +RUN echo 'deb http://www.apache.org/dist/cassandra/debian 39x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.7 +ENV CASSANDRA_VERSION 3.9 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ diff --git a/3.7/docker-entrypoint.sh b/3.9/docker-entrypoint.sh similarity index 100% rename from 3.7/docker-entrypoint.sh rename to 3.9/docker-entrypoint.sh From 7832a56e4da025d9d87db6cab5c056564995958c Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 5 Oct 2016 10:43:02 -0700 Subject: [PATCH 037/223] Update "latest" --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 827cac7..c43ee46 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -3,7 +3,7 @@ set -eu declare -A aliases=( [2.2]='2' - [3.7]='3 latest' + [3.9]='3 latest' ) self="$(basename "$BASH_SOURCE")" From 3204fb896811b4d20527b8d4a509d65189fd6913 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 10 Oct 2016 13:24:10 -0700 Subject: [PATCH 038/223] Update to 2.1.16 --- 2.1/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 0255502..f00fd7f 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -31,7 +31,7 @@ RUN set -ex \ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.1.15 +ENV CASSANDRA_VERSION 2.1.16 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From 4bb926527d4a9eb534508fe0bbae604dee81f40a Mon Sep 17 00:00:00 2001 From: Wolfgang Gerlach Date: Tue, 8 Nov 2016 13:28:32 -0600 Subject: [PATCH 039/223] added jemalloc shared library --- 2.1/Dockerfile | 3 +++ 2.2/Dockerfile | 3 +++ 3.0/Dockerfile | 3 +++ 3.9/Dockerfile | 3 +++ Dockerfile.template | 3 +++ 5 files changed, 15 insertions(+) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index f00fd7f..22b0d0d 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -18,6 +18,9 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" +RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* + # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported diff --git a/2.2/Dockerfile b/2.2/Dockerfile index bc5a585..f3d8b3a 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -18,6 +18,9 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" +RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* + # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported diff --git a/3.0/Dockerfile b/3.0/Dockerfile index bc28bac..babc12e 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -18,6 +18,9 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" +RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* + # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported diff --git a/3.9/Dockerfile b/3.9/Dockerfile index 1e28278..9eacacc 100644 --- a/3.9/Dockerfile +++ b/3.9/Dockerfile @@ -18,6 +18,9 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" +RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* + # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported diff --git a/Dockerfile.template b/Dockerfile.template index 1ac27ef..f00b303 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -18,6 +18,9 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" +RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* + # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported From d3a91560b21e73994235a72a4c3153e775e1654d Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 17 Nov 2016 01:24:09 -0800 Subject: [PATCH 040/223] Update to 3.0.10 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index babc12e..92db46a 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -34,7 +34,7 @@ RUN set -ex \ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.9 +ENV CASSANDRA_VERSION 3.0.10 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From 3ca0a18a575ae318f753ab1ecf01d54c93192681 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 10 Jan 2017 10:52:49 -0800 Subject: [PATCH 041/223] Use "/etc/apt/trusted.gpg.d" instead of "apt-key adv" > Note: Instead of using this command a keyring should be placed > directly in the /etc/apt/trusted.gpg.d/ directory with a > descriptive name and either "gpg" or "asc" as file extension. https://manpages.debian.org/cgi-bin/man.cgi?query=apt-key&manpath=Debian+testing+stretch --- 2.1/Dockerfile | 12 ++++++++---- 2.2/Dockerfile | 12 ++++++++---- 3.0/Dockerfile | 12 ++++++++---- 3.9/Dockerfile | 12 ++++++++---- Dockerfile.template | 12 ++++++++---- 5 files changed, 40 insertions(+), 20 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 22b0d0d..3106cc1 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -27,10 +27,14 @@ ENV GPG_KEYS \ 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA -RUN set -ex \ - && for key in $GPG_KEYS; do \ - apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ - done +RUN set -ex; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + rm -r "$GNUPGHOME"; \ + apt-key list RUN echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' >> /etc/apt/sources.list.d/cassandra.list diff --git a/2.2/Dockerfile b/2.2/Dockerfile index f3d8b3a..4faae1b 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -27,10 +27,14 @@ ENV GPG_KEYS \ 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA -RUN set -ex \ - && for key in $GPG_KEYS; do \ - apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ - done +RUN set -ex; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + rm -r "$GNUPGHOME"; \ + apt-key list RUN echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' >> /etc/apt/sources.list.d/cassandra.list diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 92db46a..a53f6bc 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -27,10 +27,14 @@ ENV GPG_KEYS \ 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA -RUN set -ex \ - && for key in $GPG_KEYS; do \ - apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ - done +RUN set -ex; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + rm -r "$GNUPGHOME"; \ + apt-key list RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list diff --git a/3.9/Dockerfile b/3.9/Dockerfile index 9eacacc..d8274e5 100644 --- a/3.9/Dockerfile +++ b/3.9/Dockerfile @@ -27,10 +27,14 @@ ENV GPG_KEYS \ 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA -RUN set -ex \ - && for key in $GPG_KEYS; do \ - apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ - done +RUN set -ex; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + rm -r "$GNUPGHOME"; \ + apt-key list RUN echo 'deb http://www.apache.org/dist/cassandra/debian 39x main' >> /etc/apt/sources.list.d/cassandra.list diff --git a/Dockerfile.template b/Dockerfile.template index f00b303..446a3d4 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -27,10 +27,14 @@ ENV GPG_KEYS \ 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA -RUN set -ex \ - && for key in $GPG_KEYS; do \ - apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ - done +RUN set -ex; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + rm -r "$GNUPGHOME"; \ + apt-key list RUN echo 'deb http://www.apache.org/dist/cassandra/debian %%CASSANDRA_DIST%%x main' >> /etc/apt/sources.list.d/cassandra.list From d8df3f7e1e330aec032af876a7611ae8d293d451 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 17 Feb 2017 12:39:47 -0800 Subject: [PATCH 042/223] Update from 3.9 to 3.10 --- .travis.yml | 2 +- {3.9 => 3.10}/Dockerfile | 4 ++-- {3.9 => 3.10}/docker-entrypoint.sh | 0 generate-stackbrew-library.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename {3.9 => 3.10}/Dockerfile (94%) rename {3.9 => 3.10}/docker-entrypoint.sh (100%) diff --git a/.travis.yml b/.travis.yml index 2c7be9b..2d88f43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: bash services: docker env: - - VERSION=3.9 + - VERSION=3.10 - VERSION=3.0 - VERSION=2.2 - VERSION=2.1 diff --git a/3.9/Dockerfile b/3.10/Dockerfile similarity index 94% rename from 3.9/Dockerfile rename to 3.10/Dockerfile index d8274e5..9f36256 100644 --- a/3.9/Dockerfile +++ b/3.10/Dockerfile @@ -36,9 +36,9 @@ RUN set -ex; \ rm -r "$GNUPGHOME"; \ apt-key list -RUN echo 'deb http://www.apache.org/dist/cassandra/debian 39x main' >> /etc/apt/sources.list.d/cassandra.list +RUN echo 'deb http://www.apache.org/dist/cassandra/debian 310x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.9 +ENV CASSANDRA_VERSION 3.10 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ diff --git a/3.9/docker-entrypoint.sh b/3.10/docker-entrypoint.sh similarity index 100% rename from 3.9/docker-entrypoint.sh rename to 3.10/docker-entrypoint.sh diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index c43ee46..3838a89 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -3,7 +3,7 @@ set -eu declare -A aliases=( [2.2]='2' - [3.9]='3 latest' + [3.10]='3 latest' ) self="$(basename "$BASH_SOURCE")" From 71d979a201b63d94ed904eef6218d50e2142845d Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 17 Feb 2017 12:55:34 -0800 Subject: [PATCH 043/223] Make openjdk and ca-certificates-java always prefer backports --- 2.1/Dockerfile | 7 +++++++ 2.2/Dockerfile | 7 +++++++ 3.0/Dockerfile | 7 +++++++ 3.10/Dockerfile | 7 +++++++ Dockerfile.template | 7 +++++++ 5 files changed, 35 insertions(+) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 3106cc1..cbaa7cf 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -21,6 +21,13 @@ RUN set -x \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* +# https://github.com/docker-library/cassandra/pull/98#issuecomment-280761137 +RUN { \ + echo 'Package: openjdk-* ca-certificates-java'; \ + echo 'Pin: release n=*-backports'; \ + echo 'Pin-Priority: 990'; \ + } > /etc/apt/preferences.d/java-backports + # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 4faae1b..1eebc8b 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -21,6 +21,13 @@ RUN set -x \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* +# https://github.com/docker-library/cassandra/pull/98#issuecomment-280761137 +RUN { \ + echo 'Package: openjdk-* ca-certificates-java'; \ + echo 'Pin: release n=*-backports'; \ + echo 'Pin-Priority: 990'; \ + } > /etc/apt/preferences.d/java-backports + # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported diff --git a/3.0/Dockerfile b/3.0/Dockerfile index a53f6bc..0e6d193 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -21,6 +21,13 @@ RUN set -x \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* +# https://github.com/docker-library/cassandra/pull/98#issuecomment-280761137 +RUN { \ + echo 'Package: openjdk-* ca-certificates-java'; \ + echo 'Pin: release n=*-backports'; \ + echo 'Pin-Priority: 990'; \ + } > /etc/apt/preferences.d/java-backports + # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported diff --git a/3.10/Dockerfile b/3.10/Dockerfile index 9f36256..fcdf0c2 100644 --- a/3.10/Dockerfile +++ b/3.10/Dockerfile @@ -21,6 +21,13 @@ RUN set -x \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* +# https://github.com/docker-library/cassandra/pull/98#issuecomment-280761137 +RUN { \ + echo 'Package: openjdk-* ca-certificates-java'; \ + echo 'Pin: release n=*-backports'; \ + echo 'Pin-Priority: 990'; \ + } > /etc/apt/preferences.d/java-backports + # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported diff --git a/Dockerfile.template b/Dockerfile.template index 446a3d4..bf4d25e 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -21,6 +21,13 @@ RUN set -x \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* +# https://github.com/docker-library/cassandra/pull/98#issuecomment-280761137 +RUN { \ + echo 'Package: openjdk-* ca-certificates-java'; \ + echo 'Pin: release n=*-backports'; \ + echo 'Pin-Priority: 990'; \ + } > /etc/apt/preferences.d/java-backports + # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported From 6c3f791c239b24a25d9766edb6b4d22c71669cee Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 21 Feb 2017 13:24:22 -0800 Subject: [PATCH 044/223] Update to 3.0.11 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 0e6d193..81a416b 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -45,7 +45,7 @@ RUN set -ex; \ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.10 +ENV CASSANDRA_VERSION 3.0.11 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From 3b54d76bf451717222e028b7db44044b03a3e620 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 21 Feb 2017 13:24:22 -0800 Subject: [PATCH 045/223] Update to 2.2.9 --- 2.2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 1eebc8b..8aa7185 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -45,7 +45,7 @@ RUN set -ex; \ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.2.8 +ENV CASSANDRA_VERSION 2.2.9 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From 3535be36e7b48b24b5abedebd345b5286bcffa60 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 21 Feb 2017 13:24:22 -0800 Subject: [PATCH 046/223] Update to 2.1.17 --- 2.1/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index cbaa7cf..f0dc2ff 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -45,7 +45,7 @@ RUN set -ex; \ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.1.16 +ENV CASSANDRA_VERSION 2.1.17 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ From d485b62893bc349e9a8334b5e8db59d9c343209c Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 27 Feb 2017 16:13:29 -0800 Subject: [PATCH 047/223] Add "travis_retry" to our build to reduce transitory failures Documentation is at https://docs.travis-ci.com/user/common-build-problems/#travis_retry See https://github.com/docker-library/memcached/pull/14 for the test PR for this pattern. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2d88f43..f91c3cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ before_script: - image="cassandra:$VERSION" script: - - docker build -t "$image" . + - travis_retry docker build -t "$image" . - ~/official-images/test/run.sh "$image" after_script: From 47f85f0c77bae9853a7612df1a1757bf9f4d8a41 Mon Sep 17 00:00:00 2001 From: Andreas Wederbrand Date: Fri, 7 Oct 2016 11:07:19 +0200 Subject: [PATCH 048/223] Add cassandra-tools to the image --- 2.2/Dockerfile | 1 + Dockerfile.template | 1 + 2 files changed, 2 insertions(+) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 8aa7185..921dbd9 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -49,6 +49,7 @@ ENV CASSANDRA_VERSION 2.2.9 RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ + && apt-get install -y cassandra-tools="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* # https://issues.apache.org/jira/browse/CASSANDRA-11661 diff --git a/Dockerfile.template b/Dockerfile.template index bf4d25e..f5391f1 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -49,6 +49,7 @@ ENV CASSANDRA_VERSION %%CASSANDRA_VERSION%% RUN apt-get update \ && apt-get install -y cassandra="$CASSANDRA_VERSION" \ + && apt-get install -y cassandra-tools="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* # https://issues.apache.org/jira/browse/CASSANDRA-11661 From d83b850cd17bc9198876f8686197c730e29c7448 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Wed, 8 Mar 2017 14:48:07 -0800 Subject: [PATCH 049/223] Use one apt-get install --- 2.1/Dockerfile | 4 +++- 2.2/Dockerfile | 5 +++-- 3.0/Dockerfile | 4 +++- 3.10/Dockerfile | 4 +++- Dockerfile.template | 5 +++-- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index f0dc2ff..af4f3ed 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -48,7 +48,9 @@ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' >> /etc/apt/ ENV CASSANDRA_VERSION 2.1.17 RUN apt-get update \ - && apt-get install -y cassandra="$CASSANDRA_VERSION" \ + && apt-get install -y \ + cassandra="$CASSANDRA_VERSION" \ + cassandra-tools="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* # https://issues.apache.org/jira/browse/CASSANDRA-11661 diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 921dbd9..f6ac98a 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -48,8 +48,9 @@ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' >> /etc/apt/ ENV CASSANDRA_VERSION 2.2.9 RUN apt-get update \ - && apt-get install -y cassandra="$CASSANDRA_VERSION" \ - && apt-get install -y cassandra-tools="$CASSANDRA_VERSION" \ + && apt-get install -y \ + cassandra="$CASSANDRA_VERSION" \ + cassandra-tools="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* # https://issues.apache.org/jira/browse/CASSANDRA-11661 diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 81a416b..349cce3 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -48,7 +48,9 @@ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/ ENV CASSANDRA_VERSION 3.0.11 RUN apt-get update \ - && apt-get install -y cassandra="$CASSANDRA_VERSION" \ + && apt-get install -y \ + cassandra="$CASSANDRA_VERSION" \ + cassandra-tools="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* # https://issues.apache.org/jira/browse/CASSANDRA-11661 diff --git a/3.10/Dockerfile b/3.10/Dockerfile index fcdf0c2..42c3f1b 100644 --- a/3.10/Dockerfile +++ b/3.10/Dockerfile @@ -48,7 +48,9 @@ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 310x main' >> /etc/apt ENV CASSANDRA_VERSION 3.10 RUN apt-get update \ - && apt-get install -y cassandra="$CASSANDRA_VERSION" \ + && apt-get install -y \ + cassandra="$CASSANDRA_VERSION" \ + cassandra-tools="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* # https://issues.apache.org/jira/browse/CASSANDRA-11661 diff --git a/Dockerfile.template b/Dockerfile.template index f5391f1..b946e30 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -48,8 +48,9 @@ RUN echo 'deb http://www.apache.org/dist/cassandra/debian %%CASSANDRA_DIST%%x ma ENV CASSANDRA_VERSION %%CASSANDRA_VERSION%% RUN apt-get update \ - && apt-get install -y cassandra="$CASSANDRA_VERSION" \ - && apt-get install -y cassandra-tools="$CASSANDRA_VERSION" \ + && apt-get install -y \ + cassandra="$CASSANDRA_VERSION" \ + cassandra-tools="$CASSANDRA_VERSION" \ && rm -rf /var/lib/apt/lists/* # https://issues.apache.org/jira/browse/CASSANDRA-11661 From 7ba44ab0fe6d8afdcad2ffe101303f13da20fff6 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 10 Mar 2017 13:24:18 -0800 Subject: [PATCH 050/223] Update to 3.0.12 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 349cce3..fc837ab 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -45,7 +45,7 @@ RUN set -ex; \ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.11 +ENV CASSANDRA_VERSION 3.0.12 RUN apt-get update \ && apt-get install -y \ From e80c6550afd16ead245ec73b16862984480a7cf9 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 21 Apr 2017 18:55:27 -0700 Subject: [PATCH 051/223] Update to 3.0.13 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index fc837ab..e420f7b 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -45,7 +45,7 @@ RUN set -ex; \ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.12 +ENV CASSANDRA_VERSION 3.0.13 RUN apt-get update \ && apt-get install -y \ From aebf66bbd63d5b860410837810ae738d76a03932 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 23 Jun 2017 20:24:31 +0000 Subject: [PATCH 052/223] Update to 3.0.14 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index e420f7b..52cdb4f 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -45,7 +45,7 @@ RUN set -ex; \ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.0.13 +ENV CASSANDRA_VERSION 3.0.14 RUN apt-get update \ && apt-get install -y \ From a78f0c2c40507f31a6b5048d029e77f5e3e5054b Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 27 Jun 2017 02:24:32 +0000 Subject: [PATCH 053/223] Update to 2.1.18 --- 2.1/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index af4f3ed..da0f126 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -45,7 +45,7 @@ RUN set -ex; \ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.1.17 +ENV CASSANDRA_VERSION 2.1.18 RUN apt-get update \ && apt-get install -y \ From 92e76b1607393679735adf04a7c6bf08d66278b2 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 27 Jun 2017 02:24:32 +0000 Subject: [PATCH 054/223] Update to 2.2.10 --- 2.2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index f6ac98a..5841920 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -45,7 +45,7 @@ RUN set -ex; \ RUN echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 2.2.9 +ENV CASSANDRA_VERSION 2.2.10 RUN apt-get update \ && apt-get install -y \ From f6f09faf3e50e648ec11a9676a29dd1130604c2d Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Wed, 28 Jun 2017 17:55:27 -0700 Subject: [PATCH 055/223] Update 3.10 to 3.11 --- .travis.yml | 2 +- {3.10 => 3.11}/Dockerfile | 4 ++-- {3.10 => 3.11}/docker-entrypoint.sh | 0 generate-stackbrew-library.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename {3.10 => 3.11}/Dockerfile (96%) rename {3.10 => 3.11}/docker-entrypoint.sh (100%) diff --git a/.travis.yml b/.travis.yml index f91c3cd..ffa2bbc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: bash services: docker env: - - VERSION=3.10 + - VERSION=3.11 - VERSION=3.0 - VERSION=2.2 - VERSION=2.1 diff --git a/3.10/Dockerfile b/3.11/Dockerfile similarity index 96% rename from 3.10/Dockerfile rename to 3.11/Dockerfile index 42c3f1b..6e2fb96 100644 --- a/3.10/Dockerfile +++ b/3.11/Dockerfile @@ -43,9 +43,9 @@ RUN set -ex; \ rm -r "$GNUPGHOME"; \ apt-key list -RUN echo 'deb http://www.apache.org/dist/cassandra/debian 310x main' >> /etc/apt/sources.list.d/cassandra.list +RUN echo 'deb http://www.apache.org/dist/cassandra/debian 311x main' >> /etc/apt/sources.list.d/cassandra.list -ENV CASSANDRA_VERSION 3.10 +ENV CASSANDRA_VERSION 3.11.0 RUN apt-get update \ && apt-get install -y \ diff --git a/3.10/docker-entrypoint.sh b/3.11/docker-entrypoint.sh similarity index 100% rename from 3.10/docker-entrypoint.sh rename to 3.11/docker-entrypoint.sh diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 3838a89..5d987b5 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -3,7 +3,7 @@ set -eu declare -A aliases=( [2.2]='2' - [3.10]='3 latest' + [3.11]='3 latest' ) self="$(basename "$BASH_SOURCE")" From 2f94f18213b571dbd5c9f89925d14bd4bc41d528 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 24 Aug 2017 12:50:55 -0700 Subject: [PATCH 056/223] Add as much multiarch as Cassandra's repos can handle (Which turns out to be just i386.) --- .travis.yml | 10 ++++++++++ generate-stackbrew-library.sh | 5 +++++ update.sh | 1 + 3 files changed, 16 insertions(+) diff --git a/.travis.yml b/.travis.yml index ffa2bbc..bf3e5fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,13 @@ services: docker env: - VERSION=3.11 + - VERSION=3.11 ARCH=i386 - VERSION=3.0 + - VERSION=3.0 ARCH=i386 - VERSION=2.2 + - VERSION=2.2 ARCH=i386 - VERSION=2.1 + - VERSION=2.1 ARCH=i386 install: - git clone https://github.com/docker-library/official-images.git ~/official-images @@ -14,6 +18,12 @@ before_script: - env | sort - cd "$VERSION" - image="cassandra:$VERSION" + - | + if [ -n "$ARCH" ]; then + from="$(awk '$1 == toupper("FROM") { print $2 }' Dockerfile)" + docker pull "$ARCH/$from" + docker tag "$ARCH/$from" "$from" + fi script: - travis_retry docker build -t "$image" . diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 5d987b5..9df1e4a 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -60,9 +60,14 @@ for version in "${versions[@]}"; do fi versionAliases+=( ${aliases[$version]:-} ) + # $ wget -qO- 'https://dl.bintray.com/apache/cassandra/dists/311x/Release' | grep '^Architectures:' + # Architectures: i386 amd64 + arches='amd64 i386' + echo cat <<-EOE Tags: $(join ', ' "${versionAliases[@]}") + Architectures: $(join ', ' $arches) GitCommit: $commit Directory: $version EOE diff --git a/update.sh b/update.sh index 6af190d..3032fd9 100755 --- a/update.sh +++ b/update.sh @@ -21,6 +21,7 @@ for version in "${versions[@]}"; do sed 's/%%CASSANDRA_DIST%%/'$dist'/g; s/%%CASSANDRA_VERSION%%/'$fullVersion'/g' Dockerfile.template > "$version/Dockerfile" ) + travisEnv='\n - VERSION='"$version ARCH=i386$travisEnv" travisEnv='\n - VERSION='"$version$travisEnv" done From ca3c9df03cab318d34377bba0610c741253b0466 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 1 Sep 2017 10:11:13 -0700 Subject: [PATCH 057/223] Add support for ppc64le (Cassandra 3.x+ only) --- 2.1/Dockerfile | 94 +++++++++++++++++++++++++++++++---- 2.2/Dockerfile | 94 +++++++++++++++++++++++++++++++---- 3.0/Dockerfile | 94 +++++++++++++++++++++++++++++++---- 3.11/Dockerfile | 94 +++++++++++++++++++++++++++++++---- Dockerfile.template | 94 +++++++++++++++++++++++++++++++---- generate-stackbrew-library.sh | 3 ++ 6 files changed, 423 insertions(+), 50 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index da0f126..ca01863 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -5,7 +5,7 @@ FROM debian:jessie-backports RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.7 +ENV GOSU_VERSION 1.10 RUN set -x \ && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ @@ -13,7 +13,7 @@ RUN set -x \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget @@ -43,21 +43,95 @@ RUN set -ex; \ rm -r "$GNUPGHOME"; \ apt-key list -RUN echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' >> /etc/apt/sources.list.d/cassandra.list - ENV CASSANDRA_VERSION 2.1.18 -RUN apt-get update \ - && apt-get install -y \ +RUN set -ex; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + amd64|i386) \ +# arches officialy included in upstream's repo metadata + echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' > /etc/apt/sources.list.d/cassandra.list; \ + apt-get update; \ + ;; \ + *) \ +# we're on an architecture upstream doesn't include in their repo Architectures +# but their provided packages are "Architecture: all" so we can download them directly instead + \ +# save a list of installed packages so build deps can be removed cleanly + savedAptMark="$(apt-mark showmanual)"; \ + \ +# fetch a few build dependencies + apt-get update; \ + apt-get install -y --no-install-recommends \ + wget ca-certificates \ + dpkg-dev \ + ; \ +# we don't remove APT lists here because they get re-downloaded and removed later + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies +# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies) + apt-mark showmanual | xargs apt-mark auto > /dev/null; \ + apt-mark manual $savedAptMark; \ + \ +# download the two "arch: all" packages we need + tempDir="$(mktemp -d)"; \ + for pkg in cassandra cassandra-tools; do \ + deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ + wget -O "$tempDir/$deb" "http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + done; \ + \ +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) + ls -lAFh "$tempDir"; \ + ( cd "$tempDir" && dpkg-scanpackages . > Packages ); \ + grep '^Package: ' "$tempDir/Packages"; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + ;; \ + esac; \ + \ + apt-get install -y \ cassandra="$CASSANDRA_VERSION" \ cassandra-tools="$CASSANDRA_VERSION" \ - && rm -rf /var/lib/apt/lists/* - -# https://issues.apache.org/jira/browse/CASSANDRA-11661 -RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ; \ + \ + rm -rf /var/lib/apt/lists/*; \ + \ + if [ -n "$tempDir" ]; then \ +# if we have leftovers from building, let's purge them (including extra, unnecessary build deps) + apt-get purge -y --auto-remove; \ + rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ + fi ENV CASSANDRA_CONFIG /etc/cassandra +RUN set -ex; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + ppc64el) \ +# https://issues.apache.org/jira/browse/CASSANDRA-13345 +# "The stack size specified is too small, Specify at least 328k" + if grep -q -- '^-Xss' "$CASSANDRA_CONFIG/jvm.options"; then \ +# 3.11+ (jvm.options) + grep -- '^-Xss256k$' "$CASSANDRA_CONFIG/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONFIG/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONFIG/jvm.options"; \ + elif grep -q -- '-Xss256k' "$CASSANDRA_CONFIG/cassandra-env.sh"; then \ +# 3.0 (cassandra-env.sh) + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + fi; \ + ;; \ + esac; \ + \ +# https://issues.apache.org/jira/browse/CASSANDRA-11661 + sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" + COPY docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 5841920..57e5d6c 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -5,7 +5,7 @@ FROM debian:jessie-backports RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.7 +ENV GOSU_VERSION 1.10 RUN set -x \ && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ @@ -13,7 +13,7 @@ RUN set -x \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget @@ -43,21 +43,95 @@ RUN set -ex; \ rm -r "$GNUPGHOME"; \ apt-key list -RUN echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' >> /etc/apt/sources.list.d/cassandra.list - ENV CASSANDRA_VERSION 2.2.10 -RUN apt-get update \ - && apt-get install -y \ +RUN set -ex; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + amd64|i386) \ +# arches officialy included in upstream's repo metadata + echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' > /etc/apt/sources.list.d/cassandra.list; \ + apt-get update; \ + ;; \ + *) \ +# we're on an architecture upstream doesn't include in their repo Architectures +# but their provided packages are "Architecture: all" so we can download them directly instead + \ +# save a list of installed packages so build deps can be removed cleanly + savedAptMark="$(apt-mark showmanual)"; \ + \ +# fetch a few build dependencies + apt-get update; \ + apt-get install -y --no-install-recommends \ + wget ca-certificates \ + dpkg-dev \ + ; \ +# we don't remove APT lists here because they get re-downloaded and removed later + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies +# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies) + apt-mark showmanual | xargs apt-mark auto > /dev/null; \ + apt-mark manual $savedAptMark; \ + \ +# download the two "arch: all" packages we need + tempDir="$(mktemp -d)"; \ + for pkg in cassandra cassandra-tools; do \ + deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ + wget -O "$tempDir/$deb" "http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + done; \ + \ +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) + ls -lAFh "$tempDir"; \ + ( cd "$tempDir" && dpkg-scanpackages . > Packages ); \ + grep '^Package: ' "$tempDir/Packages"; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + ;; \ + esac; \ + \ + apt-get install -y \ cassandra="$CASSANDRA_VERSION" \ cassandra-tools="$CASSANDRA_VERSION" \ - && rm -rf /var/lib/apt/lists/* - -# https://issues.apache.org/jira/browse/CASSANDRA-11661 -RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ; \ + \ + rm -rf /var/lib/apt/lists/*; \ + \ + if [ -n "$tempDir" ]; then \ +# if we have leftovers from building, let's purge them (including extra, unnecessary build deps) + apt-get purge -y --auto-remove; \ + rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ + fi ENV CASSANDRA_CONFIG /etc/cassandra +RUN set -ex; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + ppc64el) \ +# https://issues.apache.org/jira/browse/CASSANDRA-13345 +# "The stack size specified is too small, Specify at least 328k" + if grep -q -- '^-Xss' "$CASSANDRA_CONFIG/jvm.options"; then \ +# 3.11+ (jvm.options) + grep -- '^-Xss256k$' "$CASSANDRA_CONFIG/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONFIG/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONFIG/jvm.options"; \ + elif grep -q -- '-Xss256k' "$CASSANDRA_CONFIG/cassandra-env.sh"; then \ +# 3.0 (cassandra-env.sh) + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + fi; \ + ;; \ + esac; \ + \ +# https://issues.apache.org/jira/browse/CASSANDRA-11661 + sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" + COPY docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 52cdb4f..bb3ee2e 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -5,7 +5,7 @@ FROM debian:jessie-backports RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.7 +ENV GOSU_VERSION 1.10 RUN set -x \ && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ @@ -13,7 +13,7 @@ RUN set -x \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget @@ -43,21 +43,95 @@ RUN set -ex; \ rm -r "$GNUPGHOME"; \ apt-key list -RUN echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' >> /etc/apt/sources.list.d/cassandra.list - ENV CASSANDRA_VERSION 3.0.14 -RUN apt-get update \ - && apt-get install -y \ +RUN set -ex; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + amd64|i386) \ +# arches officialy included in upstream's repo metadata + echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' > /etc/apt/sources.list.d/cassandra.list; \ + apt-get update; \ + ;; \ + *) \ +# we're on an architecture upstream doesn't include in their repo Architectures +# but their provided packages are "Architecture: all" so we can download them directly instead + \ +# save a list of installed packages so build deps can be removed cleanly + savedAptMark="$(apt-mark showmanual)"; \ + \ +# fetch a few build dependencies + apt-get update; \ + apt-get install -y --no-install-recommends \ + wget ca-certificates \ + dpkg-dev \ + ; \ +# we don't remove APT lists here because they get re-downloaded and removed later + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies +# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies) + apt-mark showmanual | xargs apt-mark auto > /dev/null; \ + apt-mark manual $savedAptMark; \ + \ +# download the two "arch: all" packages we need + tempDir="$(mktemp -d)"; \ + for pkg in cassandra cassandra-tools; do \ + deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ + wget -O "$tempDir/$deb" "http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + done; \ + \ +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) + ls -lAFh "$tempDir"; \ + ( cd "$tempDir" && dpkg-scanpackages . > Packages ); \ + grep '^Package: ' "$tempDir/Packages"; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + ;; \ + esac; \ + \ + apt-get install -y \ cassandra="$CASSANDRA_VERSION" \ cassandra-tools="$CASSANDRA_VERSION" \ - && rm -rf /var/lib/apt/lists/* - -# https://issues.apache.org/jira/browse/CASSANDRA-11661 -RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ; \ + \ + rm -rf /var/lib/apt/lists/*; \ + \ + if [ -n "$tempDir" ]; then \ +# if we have leftovers from building, let's purge them (including extra, unnecessary build deps) + apt-get purge -y --auto-remove; \ + rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ + fi ENV CASSANDRA_CONFIG /etc/cassandra +RUN set -ex; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + ppc64el) \ +# https://issues.apache.org/jira/browse/CASSANDRA-13345 +# "The stack size specified is too small, Specify at least 328k" + if grep -q -- '^-Xss' "$CASSANDRA_CONFIG/jvm.options"; then \ +# 3.11+ (jvm.options) + grep -- '^-Xss256k$' "$CASSANDRA_CONFIG/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONFIG/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONFIG/jvm.options"; \ + elif grep -q -- '-Xss256k' "$CASSANDRA_CONFIG/cassandra-env.sh"; then \ +# 3.0 (cassandra-env.sh) + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + fi; \ + ;; \ + esac; \ + \ +# https://issues.apache.org/jira/browse/CASSANDRA-11661 + sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" + COPY docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 6e2fb96..dffda1c 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -5,7 +5,7 @@ FROM debian:jessie-backports RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.7 +ENV GOSU_VERSION 1.10 RUN set -x \ && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ @@ -13,7 +13,7 @@ RUN set -x \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget @@ -43,21 +43,95 @@ RUN set -ex; \ rm -r "$GNUPGHOME"; \ apt-key list -RUN echo 'deb http://www.apache.org/dist/cassandra/debian 311x main' >> /etc/apt/sources.list.d/cassandra.list - ENV CASSANDRA_VERSION 3.11.0 -RUN apt-get update \ - && apt-get install -y \ +RUN set -ex; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + amd64|i386) \ +# arches officialy included in upstream's repo metadata + echo 'deb http://www.apache.org/dist/cassandra/debian 311x main' > /etc/apt/sources.list.d/cassandra.list; \ + apt-get update; \ + ;; \ + *) \ +# we're on an architecture upstream doesn't include in their repo Architectures +# but their provided packages are "Architecture: all" so we can download them directly instead + \ +# save a list of installed packages so build deps can be removed cleanly + savedAptMark="$(apt-mark showmanual)"; \ + \ +# fetch a few build dependencies + apt-get update; \ + apt-get install -y --no-install-recommends \ + wget ca-certificates \ + dpkg-dev \ + ; \ +# we don't remove APT lists here because they get re-downloaded and removed later + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies +# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies) + apt-mark showmanual | xargs apt-mark auto > /dev/null; \ + apt-mark manual $savedAptMark; \ + \ +# download the two "arch: all" packages we need + tempDir="$(mktemp -d)"; \ + for pkg in cassandra cassandra-tools; do \ + deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ + wget -O "$tempDir/$deb" "http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + done; \ + \ +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) + ls -lAFh "$tempDir"; \ + ( cd "$tempDir" && dpkg-scanpackages . > Packages ); \ + grep '^Package: ' "$tempDir/Packages"; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + ;; \ + esac; \ + \ + apt-get install -y \ cassandra="$CASSANDRA_VERSION" \ cassandra-tools="$CASSANDRA_VERSION" \ - && rm -rf /var/lib/apt/lists/* - -# https://issues.apache.org/jira/browse/CASSANDRA-11661 -RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ; \ + \ + rm -rf /var/lib/apt/lists/*; \ + \ + if [ -n "$tempDir" ]; then \ +# if we have leftovers from building, let's purge them (including extra, unnecessary build deps) + apt-get purge -y --auto-remove; \ + rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ + fi ENV CASSANDRA_CONFIG /etc/cassandra +RUN set -ex; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + ppc64el) \ +# https://issues.apache.org/jira/browse/CASSANDRA-13345 +# "The stack size specified is too small, Specify at least 328k" + if grep -q -- '^-Xss' "$CASSANDRA_CONFIG/jvm.options"; then \ +# 3.11+ (jvm.options) + grep -- '^-Xss256k$' "$CASSANDRA_CONFIG/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONFIG/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONFIG/jvm.options"; \ + elif grep -q -- '-Xss256k' "$CASSANDRA_CONFIG/cassandra-env.sh"; then \ +# 3.0 (cassandra-env.sh) + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + fi; \ + ;; \ + esac; \ + \ +# https://issues.apache.org/jira/browse/CASSANDRA-11661 + sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" + COPY docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfile.template b/Dockerfile.template index b946e30..96052d6 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -5,7 +5,7 @@ FROM debian:jessie-backports RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.7 +ENV GOSU_VERSION 1.10 RUN set -x \ && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ @@ -13,7 +13,7 @@ RUN set -x \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget @@ -43,21 +43,95 @@ RUN set -ex; \ rm -r "$GNUPGHOME"; \ apt-key list -RUN echo 'deb http://www.apache.org/dist/cassandra/debian %%CASSANDRA_DIST%%x main' >> /etc/apt/sources.list.d/cassandra.list - ENV CASSANDRA_VERSION %%CASSANDRA_VERSION%% -RUN apt-get update \ - && apt-get install -y \ +RUN set -ex; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + amd64|i386) \ +# arches officialy included in upstream's repo metadata + echo 'deb http://www.apache.org/dist/cassandra/debian %%CASSANDRA_DIST%%x main' > /etc/apt/sources.list.d/cassandra.list; \ + apt-get update; \ + ;; \ + *) \ +# we're on an architecture upstream doesn't include in their repo Architectures +# but their provided packages are "Architecture: all" so we can download them directly instead + \ +# save a list of installed packages so build deps can be removed cleanly + savedAptMark="$(apt-mark showmanual)"; \ + \ +# fetch a few build dependencies + apt-get update; \ + apt-get install -y --no-install-recommends \ + wget ca-certificates \ + dpkg-dev \ + ; \ +# we don't remove APT lists here because they get re-downloaded and removed later + \ +# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies +# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies) + apt-mark showmanual | xargs apt-mark auto > /dev/null; \ + apt-mark manual $savedAptMark; \ + \ +# download the two "arch: all" packages we need + tempDir="$(mktemp -d)"; \ + for pkg in cassandra cassandra-tools; do \ + deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ + wget -O "$tempDir/$deb" "http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + done; \ + \ +# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) + ls -lAFh "$tempDir"; \ + ( cd "$tempDir" && dpkg-scanpackages . > Packages ); \ + grep '^Package: ' "$tempDir/Packages"; \ + echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ +# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") +# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) +# ... +# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) + apt-get -o Acquire::GzipIndexes=false update; \ + ;; \ + esac; \ + \ + apt-get install -y \ cassandra="$CASSANDRA_VERSION" \ cassandra-tools="$CASSANDRA_VERSION" \ - && rm -rf /var/lib/apt/lists/* - -# https://issues.apache.org/jira/browse/CASSANDRA-11661 -RUN sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' /etc/cassandra/cassandra-env.sh + ; \ + \ + rm -rf /var/lib/apt/lists/*; \ + \ + if [ -n "$tempDir" ]; then \ +# if we have leftovers from building, let's purge them (including extra, unnecessary build deps) + apt-get purge -y --auto-remove; \ + rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ + fi ENV CASSANDRA_CONFIG /etc/cassandra +RUN set -ex; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + ppc64el) \ +# https://issues.apache.org/jira/browse/CASSANDRA-13345 +# "The stack size specified is too small, Specify at least 328k" + if grep -q -- '^-Xss' "$CASSANDRA_CONFIG/jvm.options"; then \ +# 3.11+ (jvm.options) + grep -- '^-Xss256k$' "$CASSANDRA_CONFIG/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONFIG/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONFIG/jvm.options"; \ + elif grep -q -- '-Xss256k' "$CASSANDRA_CONFIG/cassandra-env.sh"; then \ +# 3.0 (cassandra-env.sh) + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + fi; \ + ;; \ + esac; \ + \ +# https://issues.apache.org/jira/browse/CASSANDRA-11661 + sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" + COPY docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 9df1e4a..272fa92 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -63,6 +63,9 @@ for version in "${versions[@]}"; do # $ wget -qO- 'https://dl.bintray.com/apache/cassandra/dists/311x/Release' | grep '^Architectures:' # Architectures: i386 amd64 arches='amd64 i386' + if [[ "$version" != 2.* ]]; then + arches+=' ppc64le' + fi echo cat <<-EOE From e3667b174ec7705ee383c98a5dab78789be3ff86 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 1 Sep 2017 10:32:18 -0700 Subject: [PATCH 058/223] Add arm64v8 as well --- generate-stackbrew-library.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 272fa92..4122e02 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -64,8 +64,9 @@ for version in "${versions[@]}"; do # Architectures: i386 amd64 arches='amd64 i386' if [[ "$version" != 2.* ]]; then - arches+=' ppc64le' + arches+=' arm64v8 ppc64le' fi + arches="$(echo "$arches" | xargs -n1 | sort)" echo cat <<-EOE From 8fa6a2876a831c1bab6e846cb27af475ecafceb7 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 5 Oct 2017 07:24:28 -0700 Subject: [PATCH 059/223] Update to 2.1.19 --- 2.1/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index ca01863..35ddd61 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -43,7 +43,7 @@ RUN set -ex; \ rm -r "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 2.1.18 +ENV CASSANDRA_VERSION 2.1.19 RUN set -ex; \ \ From e5698d3847ed4c4378b1171ae77b5c5ee0e58125 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 5 Oct 2017 07:24:28 -0700 Subject: [PATCH 060/223] Update to 2.2.11 --- 2.2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 57e5d6c..86013fb 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -43,7 +43,7 @@ RUN set -ex; \ rm -r "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 2.2.10 +ENV CASSANDRA_VERSION 2.2.11 RUN set -ex; \ \ From 50fbd6b9fe453e80f045d3a84f55c77240369658 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 11 Oct 2017 02:24:06 +0000 Subject: [PATCH 061/223] Update to 3.0.15 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index bb3ee2e..56d67d4 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -43,7 +43,7 @@ RUN set -ex; \ rm -r "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 3.0.14 +ENV CASSANDRA_VERSION 3.0.15 RUN set -ex; \ \ From b77e932d6935318f599026cd1ccf0a2697b3224a Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 11 Oct 2017 02:24:06 +0000 Subject: [PATCH 062/223] Update to 3.11.1 --- 3.11/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index dffda1c..02c1d15 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -43,7 +43,7 @@ RUN set -ex; \ rm -r "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 3.11.0 +ENV CASSANDRA_VERSION 3.11.1 RUN set -ex; \ \ From 88c25000ef8da0e0f7eb3a6b8202b2f7678c8dab Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 2 Jan 2018 16:12:12 -0800 Subject: [PATCH 063/223] Put "docker-entrypoint.sh" into PATH and allow it to run Cassandra when given no arguments --- 2.1/Dockerfile | 5 +++-- 2.1/docker-entrypoint.sh | 3 ++- 2.2/Dockerfile | 5 +++-- 2.2/docker-entrypoint.sh | 3 ++- 3.0/Dockerfile | 5 +++-- 3.0/docker-entrypoint.sh | 3 ++- 3.11/Dockerfile | 5 +++-- 3.11/docker-entrypoint.sh | 3 ++- Dockerfile.template | 5 +++-- docker-entrypoint.sh | 3 ++- update.sh | 33 +++++++++++++++++++++++---------- 11 files changed, 48 insertions(+), 25 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 35ddd61..7b87a4d 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -132,8 +132,9 @@ RUN set -ex; \ # https://issues.apache.org/jira/browse/CASSANDRA-11661 sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" -COPY docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] +COPY docker-entrypoint.sh /usr/local/bin/ +RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh index 16d183a..151adad 100755 --- a/2.1/docker-entrypoint.sh +++ b/2.1/docker-entrypoint.sh @@ -2,7 +2,8 @@ set -e # first arg is `-f` or `--some-option` -if [ "${1:0:1}" = '-' ]; then +# or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then set -- cassandra -f "$@" fi diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 86013fb..c538f57 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -132,8 +132,9 @@ RUN set -ex; \ # https://issues.apache.org/jira/browse/CASSANDRA-11661 sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" -COPY docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] +COPY docker-entrypoint.sh /usr/local/bin/ +RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh index 16d183a..151adad 100755 --- a/2.2/docker-entrypoint.sh +++ b/2.2/docker-entrypoint.sh @@ -2,7 +2,8 @@ set -e # first arg is `-f` or `--some-option` -if [ "${1:0:1}" = '-' ]; then +# or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then set -- cassandra -f "$@" fi diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 56d67d4..0a6c7fa 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -132,8 +132,9 @@ RUN set -ex; \ # https://issues.apache.org/jira/browse/CASSANDRA-11661 sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" -COPY docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] +COPY docker-entrypoint.sh /usr/local/bin/ +RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ diff --git a/3.0/docker-entrypoint.sh b/3.0/docker-entrypoint.sh index 16d183a..151adad 100755 --- a/3.0/docker-entrypoint.sh +++ b/3.0/docker-entrypoint.sh @@ -2,7 +2,8 @@ set -e # first arg is `-f` or `--some-option` -if [ "${1:0:1}" = '-' ]; then +# or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then set -- cassandra -f "$@" fi diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 02c1d15..7ed873e 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -132,8 +132,9 @@ RUN set -ex; \ # https://issues.apache.org/jira/browse/CASSANDRA-11661 sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" -COPY docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] +COPY docker-entrypoint.sh /usr/local/bin/ +RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ diff --git a/3.11/docker-entrypoint.sh b/3.11/docker-entrypoint.sh index 16d183a..151adad 100755 --- a/3.11/docker-entrypoint.sh +++ b/3.11/docker-entrypoint.sh @@ -2,7 +2,8 @@ set -e # first arg is `-f` or `--some-option` -if [ "${1:0:1}" = '-' ]; then +# or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then set -- cassandra -f "$@" fi diff --git a/Dockerfile.template b/Dockerfile.template index 96052d6..8e88506 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -132,8 +132,9 @@ RUN set -ex; \ # https://issues.apache.org/jira/browse/CASSANDRA-11661 sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" -COPY docker-entrypoint.sh /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] +COPY docker-entrypoint.sh /usr/local/bin/ +RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 16d183a..151adad 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -2,7 +2,8 @@ set -e # first arg is `-f` or `--some-option` -if [ "${1:0:1}" = '-' ]; then +# or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then set -- cassandra -f "$@" fi diff --git a/update.sh b/update.sh index 3032fd9..254ded4 100755 --- a/update.sh +++ b/update.sh @@ -1,5 +1,5 @@ -#!/bin/bash -set -eo pipefail +#!/usr/bin/env bash +set -Eeuo pipefail cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" @@ -13,14 +13,27 @@ travisEnv= for version in "${versions[@]}"; do dist="${version//./}" packagesUrl="http://www.apache.org/dist/cassandra/debian/dists/${dist}x/main/binary-amd64/Packages.gz" - fullVersion="$(curl -fsSL "$packagesUrl" | gunzip | awk -F ': ' '$1 == "Package" { pkg = $2 } pkg == "cassandra" && $1 == "Version" { print $2 }')" - - ( - set -x - cp docker-entrypoint.sh "$version/" - sed 's/%%CASSANDRA_DIST%%/'$dist'/g; s/%%CASSANDRA_VERSION%%/'$fullVersion'/g' Dockerfile.template > "$version/Dockerfile" - ) - + fullVersion="$( + curl -fsSL "$packagesUrl" \ + | gunzip \ + | awk -F ': ' ' + $1 == "Package" { pkg = $2 } + pkg == "cassandra" && $1 == "Version" { print $2 } + ' + )" + + echo "$version: $fullVersion" + + cp -a docker-entrypoint.sh "$version/" + sed 's/%%CASSANDRA_DIST%%/'$dist'/g; s/%%CASSANDRA_VERSION%%/'$fullVersion'/g' Dockerfile.template > "$version/Dockerfile" + + # remove the "/docker-entrypoint.sh" backwards-compatibility symlink in Cassandra 3.12+ + case "$version" in + 2.*|3.0|3.11) ;; + *) sed -i '/^RUN .* \/docker-entrypoint.sh # backwards compat$/d' "$version/Dockerfile" ;; + esac + # TODO once Cassandra 2.x and 3.x are deprecated, we should remove this from the template itself (and remove this code too) + travisEnv='\n - VERSION='"$version ARCH=i386$travisEnv" travisEnv='\n - VERSION='"$version$travisEnv" done From 59602a2819a62752388e1f8b407ec7af29d8245f Mon Sep 17 00:00:00 2001 From: J0WI Date: Sat, 20 Jan 2018 18:10:01 +0100 Subject: [PATCH 064/223] use "https" to fetch Cassandra packages --- 2.1/Dockerfile | 2 +- 2.2/Dockerfile | 2 +- 3.0/Dockerfile | 2 +- 3.11/Dockerfile | 2 +- Dockerfile.template | 2 +- update.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 7b87a4d..be3d447 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -78,7 +78,7 @@ RUN set -ex; \ tempDir="$(mktemp -d)"; \ for pkg in cassandra cassandra-tools; do \ deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + wget -O "$tempDir/$deb" "https://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ done; \ \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index c538f57..f99e9c1 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -78,7 +78,7 @@ RUN set -ex; \ tempDir="$(mktemp -d)"; \ for pkg in cassandra cassandra-tools; do \ deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + wget -O "$tempDir/$deb" "https://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ done; \ \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 0a6c7fa..784ca4a 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -78,7 +78,7 @@ RUN set -ex; \ tempDir="$(mktemp -d)"; \ for pkg in cassandra cassandra-tools; do \ deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + wget -O "$tempDir/$deb" "https://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ done; \ \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 7ed873e..899c94b 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -78,7 +78,7 @@ RUN set -ex; \ tempDir="$(mktemp -d)"; \ for pkg in cassandra cassandra-tools; do \ deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + wget -O "$tempDir/$deb" "https://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ done; \ \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) diff --git a/Dockerfile.template b/Dockerfile.template index 8e88506..9cb09d8 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -78,7 +78,7 @@ RUN set -ex; \ tempDir="$(mktemp -d)"; \ for pkg in cassandra cassandra-tools; do \ deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + wget -O "$tempDir/$deb" "https://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ done; \ \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) diff --git a/update.sh b/update.sh index 254ded4..918245e 100755 --- a/update.sh +++ b/update.sh @@ -12,7 +12,7 @@ versions=( "${versions[@]%/}" ) travisEnv= for version in "${versions[@]}"; do dist="${version//./}" - packagesUrl="http://www.apache.org/dist/cassandra/debian/dists/${dist}x/main/binary-amd64/Packages.gz" + packagesUrl="https://www.apache.org/dist/cassandra/debian/dists/${dist}x/main/binary-amd64/Packages.gz" fullVersion="$( curl -fsSL "$packagesUrl" \ | gunzip \ From 6f766afc6cf748ed70174dfcd11869e0a2b30eb0 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Fri, 9 Feb 2018 14:07:04 -0800 Subject: [PATCH 065/223] Move to slim variants and stretch for 3.x --- 2.1/Dockerfile | 32 +++++++++++++++++++++----------- 2.2/Dockerfile | 32 +++++++++++++++++++++----------- 3.0/Dockerfile | 32 +++++++++++++++++++++----------- 3.11/Dockerfile | 32 +++++++++++++++++++++----------- Dockerfile.template | 32 +++++++++++++++++++++----------- update.sh | 14 +++++++++++++- 6 files changed, 118 insertions(+), 56 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index be3d447..f2689fe 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -1,9 +1,25 @@ # vim:set ft=dockerfile: -FROM debian:jessie-backports +FROM debian:jessie-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra +RUN set -ex; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" + libjemalloc1 \ +# free is used by cassandra-env.sh + procps \ + ; \ + if ! command -v gpg > /dev/null; then \ + apt-get install -y --no-install-recommends \ + dirmngr \ + gnupg \ + ; \ + fi; \ + rm -rf /var/lib/apt/lists/* + # grab gosu for easy step-down from root ENV GOSU_VERSION 1.10 RUN set -x \ @@ -18,16 +34,6 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" -RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* - -# https://github.com/docker-library/cassandra/pull/98#issuecomment-280761137 -RUN { \ - echo 'Package: openjdk-* ca-certificates-java'; \ - echo 'Pin: release n=*-backports'; \ - echo 'Pin-Priority: 990'; \ - } > /etc/apt/preferences.d/java-backports - # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported @@ -47,6 +53,10 @@ ENV CASSANDRA_VERSION 2.1.19 RUN set -ex; \ \ +# https://bugs.debian.org/877677 +# update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory + mkdir -p /usr/share/man/man1/; \ + \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ amd64|i386) \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index f99e9c1..a6ae3c1 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -1,9 +1,25 @@ # vim:set ft=dockerfile: -FROM debian:jessie-backports +FROM debian:jessie-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra +RUN set -ex; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" + libjemalloc1 \ +# free is used by cassandra-env.sh + procps \ + ; \ + if ! command -v gpg > /dev/null; then \ + apt-get install -y --no-install-recommends \ + dirmngr \ + gnupg \ + ; \ + fi; \ + rm -rf /var/lib/apt/lists/* + # grab gosu for easy step-down from root ENV GOSU_VERSION 1.10 RUN set -x \ @@ -18,16 +34,6 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" -RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* - -# https://github.com/docker-library/cassandra/pull/98#issuecomment-280761137 -RUN { \ - echo 'Package: openjdk-* ca-certificates-java'; \ - echo 'Pin: release n=*-backports'; \ - echo 'Pin-Priority: 990'; \ - } > /etc/apt/preferences.d/java-backports - # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported @@ -47,6 +53,10 @@ ENV CASSANDRA_VERSION 2.2.11 RUN set -ex; \ \ +# https://bugs.debian.org/877677 +# update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory + mkdir -p /usr/share/man/man1/; \ + \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ amd64|i386) \ diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 784ca4a..010cf8f 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -1,9 +1,25 @@ # vim:set ft=dockerfile: -FROM debian:jessie-backports +FROM debian:stretch-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra +RUN set -ex; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" + libjemalloc1 \ +# free is used by cassandra-env.sh + procps \ + ; \ + if ! command -v gpg > /dev/null; then \ + apt-get install -y --no-install-recommends \ + dirmngr \ + gnupg \ + ; \ + fi; \ + rm -rf /var/lib/apt/lists/* + # grab gosu for easy step-down from root ENV GOSU_VERSION 1.10 RUN set -x \ @@ -18,16 +34,6 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" -RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* - -# https://github.com/docker-library/cassandra/pull/98#issuecomment-280761137 -RUN { \ - echo 'Package: openjdk-* ca-certificates-java'; \ - echo 'Pin: release n=*-backports'; \ - echo 'Pin-Priority: 990'; \ - } > /etc/apt/preferences.d/java-backports - # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported @@ -47,6 +53,10 @@ ENV CASSANDRA_VERSION 3.0.15 RUN set -ex; \ \ +# https://bugs.debian.org/877677 +# update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory + mkdir -p /usr/share/man/man1/; \ + \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ amd64|i386) \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 899c94b..e39c30d 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -1,9 +1,25 @@ # vim:set ft=dockerfile: -FROM debian:jessie-backports +FROM debian:stretch-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra +RUN set -ex; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" + libjemalloc1 \ +# free is used by cassandra-env.sh + procps \ + ; \ + if ! command -v gpg > /dev/null; then \ + apt-get install -y --no-install-recommends \ + dirmngr \ + gnupg \ + ; \ + fi; \ + rm -rf /var/lib/apt/lists/* + # grab gosu for easy step-down from root ENV GOSU_VERSION 1.10 RUN set -x \ @@ -18,16 +34,6 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" -RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* - -# https://github.com/docker-library/cassandra/pull/98#issuecomment-280761137 -RUN { \ - echo 'Package: openjdk-* ca-certificates-java'; \ - echo 'Pin: release n=*-backports'; \ - echo 'Pin-Priority: 990'; \ - } > /etc/apt/preferences.d/java-backports - # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported @@ -47,6 +53,10 @@ ENV CASSANDRA_VERSION 3.11.1 RUN set -ex; \ \ +# https://bugs.debian.org/877677 +# update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory + mkdir -p /usr/share/man/man1/; \ + \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ amd64|i386) \ diff --git a/Dockerfile.template b/Dockerfile.template index 9cb09d8..5543c7f 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,9 +1,25 @@ # vim:set ft=dockerfile: -FROM debian:jessie-backports +FROM debian:%%SUITE%% # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra +RUN set -ex; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" + libjemalloc1 \ +# free is used by cassandra-env.sh + procps \ + ; \ + if ! command -v gpg > /dev/null; then \ + apt-get install -y --no-install-recommends \ + dirmngr \ + gnupg \ + ; \ + fi; \ + rm -rf /var/lib/apt/lists/* + # grab gosu for easy step-down from root ENV GOSU_VERSION 1.10 RUN set -x \ @@ -18,16 +34,6 @@ RUN set -x \ && gosu nobody true \ && apt-get purge -y --auto-remove ca-certificates wget -# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" -RUN apt-get update && apt-get install -y --no-install-recommends libjemalloc1 && rm -rf /var/lib/apt/lists/* - -# https://github.com/docker-library/cassandra/pull/98#issuecomment-280761137 -RUN { \ - echo 'Package: openjdk-* ca-certificates-java'; \ - echo 'Pin: release n=*-backports'; \ - echo 'Pin-Priority: 990'; \ - } > /etc/apt/preferences.d/java-backports - # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported @@ -47,6 +53,10 @@ ENV CASSANDRA_VERSION %%CASSANDRA_VERSION%% RUN set -ex; \ \ +# https://bugs.debian.org/877677 +# update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory + mkdir -p /usr/share/man/man1/; \ + \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ amd64|i386) \ diff --git a/update.sh b/update.sh index 918245e..994864b 100755 --- a/update.sh +++ b/update.sh @@ -3,6 +3,13 @@ set -Eeuo pipefail cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" +# -slim is automatically added +defaultDebianSuite='stretch' +declare -A debianSuite=( + [2.1]='jessie' + [2.2]='jessie' +) + versions=( "$@" ) if [ ${#versions[@]} -eq 0 ]; then versions=( */ ) @@ -24,8 +31,13 @@ for version in "${versions[@]}"; do echo "$version: $fullVersion" + versionSuite="${debianSuite[$version]:-$defaultDebianSuite}-slim" cp -a docker-entrypoint.sh "$version/" - sed 's/%%CASSANDRA_DIST%%/'$dist'/g; s/%%CASSANDRA_VERSION%%/'$fullVersion'/g' Dockerfile.template > "$version/Dockerfile" + sed \ + -e 's/%%CASSANDRA_DIST%%/'$dist'/g;' \ + -e 's/%%CASSANDRA_VERSION%%/'$fullVersion'/g' \ + -e 's/%%SUITE%%/'$versionSuite'/g;' \ + Dockerfile.template > "$version/Dockerfile" # remove the "/docker-entrypoint.sh" backwards-compatibility symlink in Cassandra 3.12+ case "$version" in From 097fbace579ef95f3af8bb393899bd31e916e30d Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 14 Feb 2018 10:54:47 -0800 Subject: [PATCH 066/223] Add "iproute2" explicitly --- 2.1/Dockerfile | 2 ++ 2.2/Dockerfile | 2 ++ 3.0/Dockerfile | 2 ++ 3.11/Dockerfile | 2 ++ Dockerfile.template | 2 ++ 5 files changed, 10 insertions(+) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index f2689fe..fdfd17a 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -11,6 +11,8 @@ RUN set -ex; \ libjemalloc1 \ # free is used by cassandra-env.sh procps \ +# "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) + iproute2 \ ; \ if ! command -v gpg > /dev/null; then \ apt-get install -y --no-install-recommends \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index a6ae3c1..39cbece 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -11,6 +11,8 @@ RUN set -ex; \ libjemalloc1 \ # free is used by cassandra-env.sh procps \ +# "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) + iproute2 \ ; \ if ! command -v gpg > /dev/null; then \ apt-get install -y --no-install-recommends \ diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 010cf8f..f799acb 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -11,6 +11,8 @@ RUN set -ex; \ libjemalloc1 \ # free is used by cassandra-env.sh procps \ +# "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) + iproute2 \ ; \ if ! command -v gpg > /dev/null; then \ apt-get install -y --no-install-recommends \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index e39c30d..7a55457 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -11,6 +11,8 @@ RUN set -ex; \ libjemalloc1 \ # free is used by cassandra-env.sh procps \ +# "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) + iproute2 \ ; \ if ! command -v gpg > /dev/null; then \ apt-get install -y --no-install-recommends \ diff --git a/Dockerfile.template b/Dockerfile.template index 5543c7f..34d0d2b 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -11,6 +11,8 @@ RUN set -ex; \ libjemalloc1 \ # free is used by cassandra-env.sh procps \ +# "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) + iproute2 \ ; \ if ! command -v gpg > /dev/null; then \ apt-get install -y --no-install-recommends \ From ccc145c1950563dc28e05e2f889b084ba95d8387 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Wed, 14 Feb 2018 12:33:59 -0800 Subject: [PATCH 067/223] Use force for gnupg home --- 2.1/Dockerfile | 2 +- 2.2/Dockerfile | 2 +- 3.0/Dockerfile | 2 +- 3.11/Dockerfile | 2 +- Dockerfile.template | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index fdfd17a..f6d0687 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -48,7 +48,7 @@ RUN set -ex; \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ - rm -r "$GNUPGHOME"; \ + rm -rf "$GNUPGHOME"; \ apt-key list ENV CASSANDRA_VERSION 2.1.19 diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 39cbece..09a1c0c 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -48,7 +48,7 @@ RUN set -ex; \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ - rm -r "$GNUPGHOME"; \ + rm -rf "$GNUPGHOME"; \ apt-key list ENV CASSANDRA_VERSION 2.2.11 diff --git a/3.0/Dockerfile b/3.0/Dockerfile index f799acb..7cd395e 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -48,7 +48,7 @@ RUN set -ex; \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ - rm -r "$GNUPGHOME"; \ + rm -rf "$GNUPGHOME"; \ apt-key list ENV CASSANDRA_VERSION 3.0.15 diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 7a55457..8ec3c0f 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -48,7 +48,7 @@ RUN set -ex; \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ - rm -r "$GNUPGHOME"; \ + rm -rf "$GNUPGHOME"; \ apt-key list ENV CASSANDRA_VERSION 3.11.1 diff --git a/Dockerfile.template b/Dockerfile.template index 34d0d2b..2a490f9 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -48,7 +48,7 @@ RUN set -ex; \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ - rm -r "$GNUPGHOME"; \ + rm -rf "$GNUPGHOME"; \ apt-key list ENV CASSANDRA_VERSION %%CASSANDRA_VERSION%% From 0a8b0c981c2db51bcf15bda01de805f636744073 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Sat, 17 Feb 2018 00:47:46 +0000 Subject: [PATCH 068/223] Update to 2.2.12 --- 2.2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 09a1c0c..89b6780 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -51,7 +51,7 @@ RUN set -ex; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 2.2.11 +ENV CASSANDRA_VERSION 2.2.12 RUN set -ex; \ \ From f2662126a725065bc524c907a7dcfdbb6e38b31d Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Sat, 17 Feb 2018 00:47:46 +0000 Subject: [PATCH 069/223] Update to 2.1.20 --- 2.1/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index f6d0687..c9f5a52 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -51,7 +51,7 @@ RUN set -ex; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 2.1.19 +ENV CASSANDRA_VERSION 2.1.20 RUN set -ex; \ \ From 202f69bdc8514e1f1eec4c0de31a964f79af3cff Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 19 Feb 2018 21:24:07 +0000 Subject: [PATCH 070/223] Update to 3.0.16 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 7cd395e..c5b88ca 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -51,7 +51,7 @@ RUN set -ex; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 3.0.15 +ENV CASSANDRA_VERSION 3.0.16 RUN set -ex; \ \ From 88f7b82386e788634f4a0f31711c92c268640df9 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 19 Feb 2018 21:24:07 +0000 Subject: [PATCH 071/223] Update to 3.11.2 --- 3.11/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 8ec3c0f..c74f969 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -51,7 +51,7 @@ RUN set -ex; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 3.11.1 +ENV CASSANDRA_VERSION 3.11.2 RUN set -ex; \ \ From fb68cffa22fb87aa031c9f9540d25341936219bb Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 19 Apr 2018 11:04:02 -0700 Subject: [PATCH 072/223] Update generated README https://github.com/docker-library/docs/pull/1193 https://github.com/docker-library/docs/pull/1195 --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 31c718b..27a75ff 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,16 @@ -# About this Repo +# https://github.com/docker-library/cassandra -This is the Git repo of the Docker [official image](https://docs.docker.com/docker-hub/official_repos/) for [cassandra](https://registry.hub.docker.com/_/cassandra/). See [the Docker Hub page](https://registry.hub.docker.com/_/cassandra/) for the full readme on how to use this Docker image and for information regarding contributing and issues. +## Maintained by: [the Docker Community](https://github.com/docker-library/cassandra) -The full readme is generated over in [docker-library/docs](https://github.com/docker-library/docs), specifically in [docker-library/docs/cassandra](https://github.com/docker-library/docs/tree/master/cassandra). +This is the Git repo of the [Docker "Official Image"](https://docs.docker.com/docker-hub/official_repos/) for [cassandra](https://hub.docker.com/_/cassandra/) (not to be confused with any official cassandra image provided by cassandra upstream). See [the Docker Hub page](https://hub.docker.com/_/cassandra/) for the full readme on how to use this Docker image and for information regarding contributing and issues. -See a change merged here that doesn't show up on the Docker Hub yet? Check [the "library/cassandra" manifest file in the docker-library/official-images repo](https://github.com/docker-library/official-images/blob/master/library/cassandra), especially [PRs with the "library/cassandra" label on that repo](https://github.com/docker-library/official-images/labels/library%2Fcassandra). For more information about the official images process, see the [docker-library/official-images readme](https://github.com/docker-library/official-images/blob/master/README.md). +The [full description from Docker Hub](https://hub.docker.com/_/cassandra/) is generated over in [docker-library/docs](https://github.com/docker-library/docs), specifically in [docker-library/docs/cassandra](https://github.com/docker-library/docs/tree/master/cassandra). + +## See a change merged here that doesn't show up on Docker Hub yet? + +Check [the "library/cassandra" manifest file in the docker-library/official-images repo](https://github.com/docker-library/official-images/blob/master/library/cassandra), especially [PRs with the "library/cassandra" label on that repo](https://github.com/docker-library/official-images/labels/library%2Fcassandra). + +For more information about the official images process, see the [docker-library/official-images readme](https://github.com/docker-library/official-images/blob/master/README.md). --- @@ -13,4 +19,8 @@ See a change merged here that doesn't show up on the Docker Hub yet? Check [the - [Automated `update.sh`: ![build status badge](https://doi-janky.infosiftr.net/job/update.sh/job/cassandra/badge/icon)](https://doi-janky.infosiftr.net/job/update.sh/job/cassandra) +| Build | Status | Badges | (per-arch) | +|:-:|:-:|:-:|:-:| +| [`amd64`
![build status badge](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra/badge/icon)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra) | [`arm64v8`
![build status badge](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra/badge/icon)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra) | [`i386`
![build status badge](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/cassandra/badge/icon)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/cassandra) | [`ppc64le`
![build status badge](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra/badge/icon)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra) | + From 01786683a1b060f813bce5539b1743695f9cc043 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 24 Apr 2018 12:47:45 -0700 Subject: [PATCH 073/223] Swap from "hostname --ip-address" to "ip address" for IP address scraping (especially for Swarm Mode where we sometimes have an additional shared VIP) --- 2.1/docker-entrypoint.sh | 16 ++++++++++++++-- 2.2/docker-entrypoint.sh | 16 ++++++++++++++-- 3.0/docker-entrypoint.sh | 16 ++++++++++++++-- 3.11/docker-entrypoint.sh | 16 ++++++++++++++-- docker-entrypoint.sh | 16 ++++++++++++++-- 5 files changed, 70 insertions(+), 10 deletions(-) diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh index 151adad..871f7f4 100755 --- a/2.1/docker-entrypoint.sh +++ b/2.1/docker-entrypoint.sh @@ -13,18 +13,30 @@ if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then exec gosu cassandra "$BASH_SOURCE" "$@" fi +_ip_address() { + # scrape the first non-localhost IP address of the container + # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first + ip address | awk ' + $1 == "inet" && $2 !~ /^127[.]/ { + gsub(/\/.+$/, "", $2) + print $2 + exit + } + ' +} + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} : ${CASSANDRA_LISTEN_ADDRESS='auto'} if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then - CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" + CASSANDRA_LISTEN_ADDRESS="$(_ip_address)" fi : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then - CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" + CASSANDRA_BROADCAST_ADDRESS="$(_ip_address)" fi : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh index 151adad..871f7f4 100755 --- a/2.2/docker-entrypoint.sh +++ b/2.2/docker-entrypoint.sh @@ -13,18 +13,30 @@ if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then exec gosu cassandra "$BASH_SOURCE" "$@" fi +_ip_address() { + # scrape the first non-localhost IP address of the container + # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first + ip address | awk ' + $1 == "inet" && $2 !~ /^127[.]/ { + gsub(/\/.+$/, "", $2) + print $2 + exit + } + ' +} + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} : ${CASSANDRA_LISTEN_ADDRESS='auto'} if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then - CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" + CASSANDRA_LISTEN_ADDRESS="$(_ip_address)" fi : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then - CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" + CASSANDRA_BROADCAST_ADDRESS="$(_ip_address)" fi : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} diff --git a/3.0/docker-entrypoint.sh b/3.0/docker-entrypoint.sh index 151adad..871f7f4 100755 --- a/3.0/docker-entrypoint.sh +++ b/3.0/docker-entrypoint.sh @@ -13,18 +13,30 @@ if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then exec gosu cassandra "$BASH_SOURCE" "$@" fi +_ip_address() { + # scrape the first non-localhost IP address of the container + # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first + ip address | awk ' + $1 == "inet" && $2 !~ /^127[.]/ { + gsub(/\/.+$/, "", $2) + print $2 + exit + } + ' +} + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} : ${CASSANDRA_LISTEN_ADDRESS='auto'} if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then - CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" + CASSANDRA_LISTEN_ADDRESS="$(_ip_address)" fi : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then - CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" + CASSANDRA_BROADCAST_ADDRESS="$(_ip_address)" fi : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} diff --git a/3.11/docker-entrypoint.sh b/3.11/docker-entrypoint.sh index 151adad..871f7f4 100755 --- a/3.11/docker-entrypoint.sh +++ b/3.11/docker-entrypoint.sh @@ -13,18 +13,30 @@ if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then exec gosu cassandra "$BASH_SOURCE" "$@" fi +_ip_address() { + # scrape the first non-localhost IP address of the container + # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first + ip address | awk ' + $1 == "inet" && $2 !~ /^127[.]/ { + gsub(/\/.+$/, "", $2) + print $2 + exit + } + ' +} + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} : ${CASSANDRA_LISTEN_ADDRESS='auto'} if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then - CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" + CASSANDRA_LISTEN_ADDRESS="$(_ip_address)" fi : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then - CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" + CASSANDRA_BROADCAST_ADDRESS="$(_ip_address)" fi : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 151adad..871f7f4 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -13,18 +13,30 @@ if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then exec gosu cassandra "$BASH_SOURCE" "$@" fi +_ip_address() { + # scrape the first non-localhost IP address of the container + # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first + ip address | awk ' + $1 == "inet" && $2 !~ /^127[.]/ { + gsub(/\/.+$/, "", $2) + print $2 + exit + } + ' +} + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} : ${CASSANDRA_LISTEN_ADDRESS='auto'} if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then - CASSANDRA_LISTEN_ADDRESS="$(hostname --ip-address)" + CASSANDRA_LISTEN_ADDRESS="$(_ip_address)" fi : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then - CASSANDRA_BROADCAST_ADDRESS="$(hostname --ip-address)" + CASSANDRA_BROADCAST_ADDRESS="$(_ip_address)" fi : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} From deeb9b3ede9118ce4f642860d74c8513d39461b8 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 18 May 2018 12:00:49 -0700 Subject: [PATCH 074/223] Add arm64v8 to 2.1 (but not 2.2) --- generate-stackbrew-library.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 4122e02..7548b87 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -63,9 +63,19 @@ for version in "${versions[@]}"; do # $ wget -qO- 'https://dl.bintray.com/apache/cassandra/dists/311x/Release' | grep '^Architectures:' # Architectures: i386 amd64 arches='amd64 i386' + + # https://github.com/docker-library/cassandra/pull/116#issuecomment-326650640 + # Exception (java.lang.RuntimeException) encountered during startup: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native + # java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native + if [ "$version" != '2.2' ]; then + # on arm64, 2.1 works fine + arches+=' arm64v8' + fi if [[ "$version" != 2.* ]]; then - arches+=' arm64v8 ppc64le' + # on ppc64le, 2.x both fail + arches+=' ppc64le' fi + arches="$(echo "$arches" | xargs -n1 | sort)" echo From 3ab33070585d602d5403cb6ef655f30777046a43 Mon Sep 17 00:00:00 2001 From: David Vincelli Date: Mon, 23 Jul 2018 10:29:48 -0400 Subject: [PATCH 075/223] Filter out loopback VIP interfaces --- 2.1/docker-entrypoint.sh | 2 +- 2.2/docker-entrypoint.sh | 2 +- 3.0/docker-entrypoint.sh | 2 +- 3.11/docker-entrypoint.sh | 2 +- docker-entrypoint.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh index 871f7f4..6299af0 100755 --- a/2.1/docker-entrypoint.sh +++ b/2.1/docker-entrypoint.sh @@ -17,7 +17,7 @@ _ip_address() { # scrape the first non-localhost IP address of the container # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first ip address | awk ' - $1 == "inet" && $2 !~ /^127[.]/ { + $1 == "inet" && $NF != "lo" { gsub(/\/.+$/, "", $2) print $2 exit diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh index 871f7f4..6299af0 100755 --- a/2.2/docker-entrypoint.sh +++ b/2.2/docker-entrypoint.sh @@ -17,7 +17,7 @@ _ip_address() { # scrape the first non-localhost IP address of the container # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first ip address | awk ' - $1 == "inet" && $2 !~ /^127[.]/ { + $1 == "inet" && $NF != "lo" { gsub(/\/.+$/, "", $2) print $2 exit diff --git a/3.0/docker-entrypoint.sh b/3.0/docker-entrypoint.sh index 871f7f4..6299af0 100755 --- a/3.0/docker-entrypoint.sh +++ b/3.0/docker-entrypoint.sh @@ -17,7 +17,7 @@ _ip_address() { # scrape the first non-localhost IP address of the container # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first ip address | awk ' - $1 == "inet" && $2 !~ /^127[.]/ { + $1 == "inet" && $NF != "lo" { gsub(/\/.+$/, "", $2) print $2 exit diff --git a/3.11/docker-entrypoint.sh b/3.11/docker-entrypoint.sh index 871f7f4..6299af0 100755 --- a/3.11/docker-entrypoint.sh +++ b/3.11/docker-entrypoint.sh @@ -17,7 +17,7 @@ _ip_address() { # scrape the first non-localhost IP address of the container # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first ip address | awk ' - $1 == "inet" && $2 !~ /^127[.]/ { + $1 == "inet" && $NF != "lo" { gsub(/\/.+$/, "", $2) print $2 exit diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 871f7f4..6299af0 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -17,7 +17,7 @@ _ip_address() { # scrape the first non-localhost IP address of the container # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first ip address | awk ' - $1 == "inet" && $2 !~ /^127[.]/ { + $1 == "inet" && $NF != "lo" { gsub(/\/.+$/, "", $2) print $2 exit From 52c8f84fde152faa51ff3f16cc5ca908f72808c4 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 30 Jul 2018 09:13:02 -0700 Subject: [PATCH 076/223] Remove ending year from LICENSE See https://github.com/docker-library/golang/pull/212 --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 508036e..157ea15 100644 --- a/LICENSE +++ b/LICENSE @@ -176,7 +176,7 @@ END OF TERMS AND CONDITIONS - Copyright 2013-2015 Docker, Inc. + Copyright 2013 Docker, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 986cea9cdfbf38ae611bdfbd14f1b1cc17194e0c Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 30 Jul 2018 09:36:02 -0700 Subject: [PATCH 077/223] Add "pgp-happy-eyeballs" in Travis to help cut down on gpg-related issues --- .travis.yml | 24 +++++++++++++++++------- 2.1/Dockerfile | 2 ++ 2.2/Dockerfile | 2 ++ 3.0/Dockerfile | 2 ++ 3.11/Dockerfile | 2 ++ Dockerfile.template | 2 ++ 6 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index bf3e5fb..36294e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,18 +16,28 @@ install: before_script: - env | sort + - wget -qO- 'https://github.com/tianon/pgp-happy-eyeballs/raw/master/hack-my-builds.sh' | bash - cd "$VERSION" - image="cassandra:$VERSION" - | - if [ -n "$ARCH" ]; then - from="$(awk '$1 == toupper("FROM") { print $2 }' Dockerfile)" - docker pull "$ARCH/$from" - docker tag "$ARCH/$from" "$from" - fi + ( + set -Eeuo pipefail + set -x + if [ -n "${ARCH:-}" ]; then + from="$(awk '$1 == toupper("FROM") { print $2 }' Dockerfile)" + docker pull "$ARCH/$from" + docker tag "$ARCH/$from" "$from" + fi + ) script: - - travis_retry docker build -t "$image" . - - ~/official-images/test/run.sh "$image" + - | + ( + set -Eeuo pipefail + set -x + docker build -t "$image" . + ~/official-images/test/run.sh "$image" + ) after_script: - docker images diff --git a/2.1/Dockerfile b/2.1/Dockerfile index c9f5a52..5b8f731 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -31,6 +31,7 @@ RUN set -x \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ @@ -48,6 +49,7 @@ RUN set -ex; \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + command -v gpgconf && gpgconf --kill all || :; \ rm -rf "$GNUPGHOME"; \ apt-key list diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 89b6780..6a2d888 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -31,6 +31,7 @@ RUN set -x \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ @@ -48,6 +49,7 @@ RUN set -ex; \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + command -v gpgconf && gpgconf --kill all || :; \ rm -rf "$GNUPGHOME"; \ apt-key list diff --git a/3.0/Dockerfile b/3.0/Dockerfile index c5b88ca..d4eb8f3 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -31,6 +31,7 @@ RUN set -x \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ @@ -48,6 +49,7 @@ RUN set -ex; \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + command -v gpgconf && gpgconf --kill all || :; \ rm -rf "$GNUPGHOME"; \ apt-key list diff --git a/3.11/Dockerfile b/3.11/Dockerfile index c74f969..0a408f4 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -31,6 +31,7 @@ RUN set -x \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ @@ -48,6 +49,7 @@ RUN set -ex; \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + command -v gpgconf && gpgconf --kill all || :; \ rm -rf "$GNUPGHOME"; \ apt-key list diff --git a/Dockerfile.template b/Dockerfile.template index 2a490f9..91db84a 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -31,6 +31,7 @@ RUN set -x \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ && chmod +x /usr/local/bin/gosu \ && gosu nobody true \ @@ -48,6 +49,7 @@ RUN set -ex; \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + command -v gpgconf && gpgconf --kill all || :; \ rm -rf "$GNUPGHOME"; \ apt-key list From 290059ff8dfece6b7db18365c7172fac0f007c83 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 1 Aug 2018 20:24:07 +0000 Subject: [PATCH 078/223] Update to 3.0.17 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index d4eb8f3..372ada7 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -53,7 +53,7 @@ RUN set -ex; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 3.0.16 +ENV CASSANDRA_VERSION 3.0.17 RUN set -ex; \ \ From 4474c6c5cc2a81ee57c5615aae00555fca7e26a6 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 1 Aug 2018 20:24:07 +0000 Subject: [PATCH 079/223] Update to 3.11.3 --- 3.11/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 0a408f4..0de407a 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -53,7 +53,7 @@ RUN set -ex; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 3.11.2 +ENV CASSANDRA_VERSION 3.11.3 RUN set -ex; \ \ From 9182976ad885af573aaefaabd99432d0c3c2fa6a Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 1 Aug 2018 20:24:07 +0000 Subject: [PATCH 080/223] Update to 2.2.13 --- 2.2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 6a2d888..249e9c4 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -53,7 +53,7 @@ RUN set -ex; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 2.2.12 +ENV CASSANDRA_VERSION 2.2.13 RUN set -ex; \ \ From 19d3619283ba0c9cce53b3064548101325e371c2 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Tue, 25 Sep 2018 12:43:09 -0700 Subject: [PATCH 081/223] Only chown things in the entrypoint that are not already owned by cassandra --- 2.1/docker-entrypoint.sh | 3 ++- 2.2/docker-entrypoint.sh | 3 ++- 3.0/docker-entrypoint.sh | 3 ++- 3.11/docker-entrypoint.sh | 3 ++- docker-entrypoint.sh | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh index 6299af0..60e6631 100755 --- a/2.1/docker-entrypoint.sh +++ b/2.1/docker-entrypoint.sh @@ -9,7 +9,8 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" + find /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" \ + \! -user cassandra -exec chown cassandra '{}' + exec gosu cassandra "$BASH_SOURCE" "$@" fi diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh index 6299af0..60e6631 100755 --- a/2.2/docker-entrypoint.sh +++ b/2.2/docker-entrypoint.sh @@ -9,7 +9,8 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" + find /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" \ + \! -user cassandra -exec chown cassandra '{}' + exec gosu cassandra "$BASH_SOURCE" "$@" fi diff --git a/3.0/docker-entrypoint.sh b/3.0/docker-entrypoint.sh index 6299af0..60e6631 100755 --- a/3.0/docker-entrypoint.sh +++ b/3.0/docker-entrypoint.sh @@ -9,7 +9,8 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" + find /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" \ + \! -user cassandra -exec chown cassandra '{}' + exec gosu cassandra "$BASH_SOURCE" "$@" fi diff --git a/3.11/docker-entrypoint.sh b/3.11/docker-entrypoint.sh index 6299af0..60e6631 100755 --- a/3.11/docker-entrypoint.sh +++ b/3.11/docker-entrypoint.sh @@ -9,7 +9,8 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" + find /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" \ + \! -user cassandra -exec chown cassandra '{}' + exec gosu cassandra "$BASH_SOURCE" "$@" fi diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 6299af0..60e6631 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -9,7 +9,8 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - chown -R cassandra /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" + find /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" \ + \! -user cassandra -exec chown cassandra '{}' + exec gosu cassandra "$BASH_SOURCE" "$@" fi From 0e270a93b53119818f9c71fa273cda3a07d0bf5c Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 1 Oct 2018 16:01:51 -0700 Subject: [PATCH 082/223] Adjust "sed" expressions so we can bind-mount the configuration file This allows the file to be rewritten in-place even in the face of a bind mount (assuming permissions, etc). --- 2.1/docker-entrypoint.sh | 21 +++++++++++++++++---- 2.2/docker-entrypoint.sh | 21 +++++++++++++++++---- 3.0/docker-entrypoint.sh | 21 +++++++++++++++++---- 3.11/docker-entrypoint.sh | 21 +++++++++++++++++---- docker-entrypoint.sh | 21 +++++++++++++++++---- 5 files changed, 85 insertions(+), 20 deletions(-) diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh index 60e6631..6f08ce7 100755 --- a/2.1/docker-entrypoint.sh +++ b/2.1/docker-entrypoint.sh @@ -26,6 +26,16 @@ _ip_address() { ' } +# "sed -i", but without "mv" (which doesn't work on a bind-mounted file, for example) +_sed-in-place() { + local filename="$1"; shift + local tempFile + tempFile="$(mktemp)" + sed "$@" "$filename" > "$tempFile" + cat "$tempFile" > "$filename" + rm "$tempFile" +} + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} @@ -45,8 +55,9 @@ if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_SEEDS:="cassandra"} fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - - sed -ri 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + + _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' for yaml in \ broadcast_address \ @@ -61,7 +72,8 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${yaml^^}" val="${!var}" if [ "$val" ]; then - sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" + _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' fi done @@ -69,7 +81,8 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${rackdc^^}" val="${!var}" if [ "$val" ]; then - sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" + _sed-in-place "$CASSANDRA_CONFIG/cassandra-rackdc.properties" \ + -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' fi done fi diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh index 60e6631..6f08ce7 100755 --- a/2.2/docker-entrypoint.sh +++ b/2.2/docker-entrypoint.sh @@ -26,6 +26,16 @@ _ip_address() { ' } +# "sed -i", but without "mv" (which doesn't work on a bind-mounted file, for example) +_sed-in-place() { + local filename="$1"; shift + local tempFile + tempFile="$(mktemp)" + sed "$@" "$filename" > "$tempFile" + cat "$tempFile" > "$filename" + rm "$tempFile" +} + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} @@ -45,8 +55,9 @@ if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_SEEDS:="cassandra"} fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - - sed -ri 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + + _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' for yaml in \ broadcast_address \ @@ -61,7 +72,8 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${yaml^^}" val="${!var}" if [ "$val" ]; then - sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" + _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' fi done @@ -69,7 +81,8 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${rackdc^^}" val="${!var}" if [ "$val" ]; then - sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" + _sed-in-place "$CASSANDRA_CONFIG/cassandra-rackdc.properties" \ + -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' fi done fi diff --git a/3.0/docker-entrypoint.sh b/3.0/docker-entrypoint.sh index 60e6631..6f08ce7 100755 --- a/3.0/docker-entrypoint.sh +++ b/3.0/docker-entrypoint.sh @@ -26,6 +26,16 @@ _ip_address() { ' } +# "sed -i", but without "mv" (which doesn't work on a bind-mounted file, for example) +_sed-in-place() { + local filename="$1"; shift + local tempFile + tempFile="$(mktemp)" + sed "$@" "$filename" > "$tempFile" + cat "$tempFile" > "$filename" + rm "$tempFile" +} + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} @@ -45,8 +55,9 @@ if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_SEEDS:="cassandra"} fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - - sed -ri 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + + _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' for yaml in \ broadcast_address \ @@ -61,7 +72,8 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${yaml^^}" val="${!var}" if [ "$val" ]; then - sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" + _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' fi done @@ -69,7 +81,8 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${rackdc^^}" val="${!var}" if [ "$val" ]; then - sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" + _sed-in-place "$CASSANDRA_CONFIG/cassandra-rackdc.properties" \ + -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' fi done fi diff --git a/3.11/docker-entrypoint.sh b/3.11/docker-entrypoint.sh index 60e6631..6f08ce7 100755 --- a/3.11/docker-entrypoint.sh +++ b/3.11/docker-entrypoint.sh @@ -26,6 +26,16 @@ _ip_address() { ' } +# "sed -i", but without "mv" (which doesn't work on a bind-mounted file, for example) +_sed-in-place() { + local filename="$1"; shift + local tempFile + tempFile="$(mktemp)" + sed "$@" "$filename" > "$tempFile" + cat "$tempFile" > "$filename" + rm "$tempFile" +} + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} @@ -45,8 +55,9 @@ if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_SEEDS:="cassandra"} fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - - sed -ri 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + + _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' for yaml in \ broadcast_address \ @@ -61,7 +72,8 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${yaml^^}" val="${!var}" if [ "$val" ]; then - sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" + _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' fi done @@ -69,7 +81,8 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${rackdc^^}" val="${!var}" if [ "$val" ]; then - sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" + _sed-in-place "$CASSANDRA_CONFIG/cassandra-rackdc.properties" \ + -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' fi done fi diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 60e6631..6f08ce7 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -26,6 +26,16 @@ _ip_address() { ' } +# "sed -i", but without "mv" (which doesn't work on a bind-mounted file, for example) +_sed-in-place() { + local filename="$1"; shift + local tempFile + tempFile="$(mktemp)" + sed "$@" "$filename" > "$tempFile" + cat "$tempFile" > "$filename" + rm "$tempFile" +} + if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} @@ -45,8 +55,9 @@ if [ "$1" = 'cassandra' ]; then : ${CASSANDRA_SEEDS:="cassandra"} fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - - sed -ri 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' "$CASSANDRA_CONFIG/cassandra.yaml" + + _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' for yaml in \ broadcast_address \ @@ -61,7 +72,8 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${yaml^^}" val="${!var}" if [ "$val" ]; then - sed -ri 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' "$CASSANDRA_CONFIG/cassandra.yaml" + _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' fi done @@ -69,7 +81,8 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${rackdc^^}" val="${!var}" if [ "$val" ]; then - sed -ri 's/^('"$rackdc"'=).*/\1 '"$val"'/' "$CASSANDRA_CONFIG/cassandra-rackdc.properties" + _sed-in-place "$CASSANDRA_CONFIG/cassandra-rackdc.properties" \ + -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' fi done fi From c80b2d6a3f5668f01246e44883e851ae37114194 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 29 Oct 2018 23:18:48 -0700 Subject: [PATCH 083/223] Update 2.1 and 2.2 to stretch This gets "cassandra" off the "naughty-from" report (https://doi-janky.infosiftr.net/job/reports/job/naughty-from/) and gives us a more well-supported base. --- 2.1/Dockerfile | 2 +- 2.2/Dockerfile | 2 +- update.sh | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 5b8f731..2cff580 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -1,5 +1,5 @@ # vim:set ft=dockerfile: -FROM debian:jessie-slim +FROM debian:stretch-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 249e9c4..dce1ed7 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -1,5 +1,5 @@ # vim:set ft=dockerfile: -FROM debian:jessie-slim +FROM debian:stretch-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra diff --git a/update.sh b/update.sh index 994864b..a97a779 100755 --- a/update.sh +++ b/update.sh @@ -6,8 +6,7 @@ cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" # -slim is automatically added defaultDebianSuite='stretch' declare -A debianSuite=( - [2.1]='jessie' - [2.2]='jessie' + #[2.2]='jessie' ) versions=( "$@" ) From 5c58a3353bb4d533f78bf809f1e55ea0b67b4ba5 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 14 Nov 2018 12:29:15 -0800 Subject: [PATCH 084/223] Update "gpg" invocations to use "--batch" See https://bugs.debian.org/913614 --- 2.1/Dockerfile | 6 +++--- 2.2/Dockerfile | 6 +++--- 3.0/Dockerfile | 6 +++--- 3.11/Dockerfile | 6 +++--- Dockerfile.template | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 2cff580..52ab876 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -29,7 +29,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ @@ -46,9 +46,9 @@ ENV GPG_KEYS \ RUN set -ex; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ - gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + gpg --batch --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ command -v gpgconf && gpgconf --kill all || :; \ rm -rf "$GNUPGHOME"; \ apt-key list diff --git a/2.2/Dockerfile b/2.2/Dockerfile index dce1ed7..ad3282f 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -29,7 +29,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ @@ -46,9 +46,9 @@ ENV GPG_KEYS \ RUN set -ex; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ - gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + gpg --batch --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ command -v gpgconf && gpgconf --kill all || :; \ rm -rf "$GNUPGHOME"; \ apt-key list diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 372ada7..d13bcd7 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -29,7 +29,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ @@ -46,9 +46,9 @@ ENV GPG_KEYS \ RUN set -ex; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ - gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + gpg --batch --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ command -v gpgconf && gpgconf --kill all || :; \ rm -rf "$GNUPGHOME"; \ apt-key list diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 0de407a..d769005 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -29,7 +29,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ @@ -46,9 +46,9 @@ ENV GPG_KEYS \ RUN set -ex; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ - gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + gpg --batch --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ command -v gpgconf && gpgconf --kill all || :; \ rm -rf "$GNUPGHOME"; \ apt-key list diff --git a/Dockerfile.template b/Dockerfile.template index 91db84a..c7dceec 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -29,7 +29,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ @@ -46,9 +46,9 @@ ENV GPG_KEYS \ RUN set -ex; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ done; \ - gpg --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ + gpg --batch --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ command -v gpgconf && gpgconf --kill all || :; \ rm -rf "$GNUPGHOME"; \ apt-key list From 7d1d7789603d94ec1c8e71d15ef57dacd5cb4dd0 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 12 Feb 2019 03:24:10 +0000 Subject: [PATCH 085/223] Update to 3.0.18 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index d13bcd7..1d8c362 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -53,7 +53,7 @@ RUN set -ex; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 3.0.17 +ENV CASSANDRA_VERSION 3.0.18 RUN set -ex; \ \ From 064fb4e2682bf9c1909e4cb27225fa74862c9086 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 12 Feb 2019 03:24:10 +0000 Subject: [PATCH 086/223] Update to 3.11.4 --- 3.11/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index d769005..6c823db 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -53,7 +53,7 @@ RUN set -ex; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 3.11.3 +ENV CASSANDRA_VERSION 3.11.4 RUN set -ex; \ \ From c71c19d1fe8796c15217fd1b8024bb44aa011593 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 12 Feb 2019 03:24:10 +0000 Subject: [PATCH 087/223] Update to 2.1.21 --- 2.1/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 52ab876..87a3772 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -53,7 +53,7 @@ RUN set -ex; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 2.1.20 +ENV CASSANDRA_VERSION 2.1.21 RUN set -ex; \ \ From 386357f2c90e5a53ad26f610cdc0eb001a67e9f0 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 12 Feb 2019 03:24:10 +0000 Subject: [PATCH 088/223] Update to 2.2.14 --- 2.2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index ad3282f..caeb86e 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -53,7 +53,7 @@ RUN set -ex; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 2.2.13 +ENV CASSANDRA_VERSION 2.2.14 RUN set -ex; \ \ From d8f3c2a326d512b6bfbc517c4eb4706193b6418d Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 13 Jun 2019 16:11:38 -0700 Subject: [PATCH 089/223] Update generated README Especially to link to the new FAQ entry (https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what) --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 27a75ff..afe1e15 100644 --- a/README.md +++ b/README.md @@ -2,25 +2,23 @@ ## Maintained by: [the Docker Community](https://github.com/docker-library/cassandra) -This is the Git repo of the [Docker "Official Image"](https://docs.docker.com/docker-hub/official_repos/) for [cassandra](https://hub.docker.com/_/cassandra/) (not to be confused with any official cassandra image provided by cassandra upstream). See [the Docker Hub page](https://hub.docker.com/_/cassandra/) for the full readme on how to use this Docker image and for information regarding contributing and issues. +This is the Git repo of the [Docker "Official Image"](https://github.com/docker-library/official-images#what-are-official-images) for [`cassandra`](https://hub.docker.com/_/cassandra/) (not to be confused with any official `cassandra` image provided by `cassandra` upstream). See [the Docker Hub page](https://hub.docker.com/_/cassandra/) for the full readme on how to use this Docker image and for information regarding contributing and issues. -The [full description from Docker Hub](https://hub.docker.com/_/cassandra/) is generated over in [docker-library/docs](https://github.com/docker-library/docs), specifically in [docker-library/docs/cassandra](https://github.com/docker-library/docs/tree/master/cassandra). +The [full image description on Docker Hub](https://hub.docker.com/_/cassandra/) is generated/maintained over in [the docker-library/docs repository](https://github.com/docker-library/docs), specifically in [the `cassandra` directory](https://github.com/docker-library/docs/tree/master/cassandra). ## See a change merged here that doesn't show up on Docker Hub yet? -Check [the "library/cassandra" manifest file in the docker-library/official-images repo](https://github.com/docker-library/official-images/blob/master/library/cassandra), especially [PRs with the "library/cassandra" label on that repo](https://github.com/docker-library/official-images/labels/library%2Fcassandra). +For more information about the full official images change lifecycle, see [the "An image's source changed in Git, now what?" FAQ entry](https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what). -For more information about the official images process, see the [docker-library/official-images readme](https://github.com/docker-library/official-images/blob/master/README.md). +For outstanding `cassandra` image PRs, check [PRs with the "library/cassandra" label on the official-images repository](https://github.com/docker-library/official-images/labels/library%2Fcassandra). For the current "source of truth" for [`cassandra`](https://hub.docker.com/_/cassandra/), see [the `library/cassandra` file in the official-images repository](https://github.com/docker-library/official-images/blob/master/library/cassandra). --- -- [Travis CI: - ![build status badge](https://img.shields.io/travis/docker-library/cassandra/master.svg)](https://travis-ci.org/docker-library/cassandra/branches) -- [Automated `update.sh`: - ![build status badge](https://doi-janky.infosiftr.net/job/update.sh/job/cassandra/badge/icon)](https://doi-janky.infosiftr.net/job/update.sh/job/cassandra) +- [![build status badge](https://img.shields.io/travis/docker-library/cassandra/master.svg?label=Travis%20CI)](https://travis-ci.org/docker-library/cassandra/branches) +- [![build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/update.sh/job/cassandra.svg?label=Automated%20update.sh)](https://doi-janky.infosiftr.net/job/update.sh/job/cassandra) | Build | Status | Badges | (per-arch) | |:-:|:-:|:-:|:-:| -| [`amd64`
![build status badge](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra/badge/icon)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra) | [`arm64v8`
![build status badge](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra/badge/icon)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra) | [`i386`
![build status badge](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/cassandra/badge/icon)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/cassandra) | [`ppc64le`
![build status badge](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra/badge/icon)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra) | +| [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra) | [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra) | [![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/cassandra.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/cassandra) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra) | From 7b1c4d93db2a8d640541c6cdf83596cc3821086b Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 2 Jul 2019 15:08:37 -0700 Subject: [PATCH 090/223] Switch from ha.pool.sks-keyservers.net to keys.openpgp.org for fetching Tianon's PGP key --- 2.1/Dockerfile | 2 +- 2.2/Dockerfile | 2 +- 3.0/Dockerfile | 2 +- 3.11/Dockerfile | 2 +- Dockerfile.template | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 87a3772..c538962 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -29,7 +29,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index caeb86e..b07c78b 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -29,7 +29,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 1d8c362..0bb58b6 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -29,7 +29,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 6c823db..719f656 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -29,7 +29,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ diff --git a/Dockerfile.template b/Dockerfile.template index c7dceec..333c76a 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -29,7 +29,7 @@ RUN set -x \ && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ && { command -v gpgconf && gpgconf --kill all || :; } \ && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ From 5b7eebbf4412cf8b1434cfe6430648c606cdd6de Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 3 Jul 2019 08:16:05 -0700 Subject: [PATCH 091/223] Use explicit "hkps" for keys.openpgp.org --- 2.1/Dockerfile | 46 ++++++++++++++++++++++----------------------- 2.2/Dockerfile | 46 ++++++++++++++++++++++----------------------- 3.0/Dockerfile | 46 ++++++++++++++++++++++----------------------- 3.11/Dockerfile | 46 ++++++++++++++++++++++----------------------- Dockerfile.template | 46 ++++++++++++++++++++++----------------------- 5 files changed, 115 insertions(+), 115 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index c538962..b75239a 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -4,9 +4,10 @@ FROM debian:stretch-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra -RUN set -ex; \ +RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ + gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" libjemalloc1 \ # free is used by cassandra-env.sh @@ -14,28 +15,27 @@ RUN set -ex; \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ ; \ - if ! command -v gpg > /dev/null; then \ - apt-get install -y --no-install-recommends \ - dirmngr \ - gnupg \ - ; \ - fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root ENV GOSU_VERSION 1.10 -RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && { command -v gpgconf && gpgconf --kill all || :; } \ - && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ - && chmod +x /usr/local/bin/gosu \ - && gosu nobody true \ - && apt-get purge -y --auto-remove ca-certificates wget +RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates wget; \ + rm -rf /var/lib/apt/lists/*; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc"; \ + 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; \ + chmod +x /usr/local/bin/gosu; \ + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + gosu nobody true # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ @@ -43,7 +43,7 @@ ENV GPG_KEYS \ 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA -RUN set -ex; \ +RUN set -eux; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ @@ -55,7 +55,7 @@ RUN set -ex; \ ENV CASSANDRA_VERSION 2.1.21 -RUN set -ex; \ +RUN set -eux; \ \ # https://bugs.debian.org/877677 # update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory @@ -115,7 +115,7 @@ RUN set -ex; \ \ rm -rf /var/lib/apt/lists/*; \ \ - if [ -n "$tempDir" ]; then \ + if [ -n "${tempDir:-}" ]; then \ # if we have leftovers from building, let's purge them (including extra, unnecessary build deps) apt-get purge -y --auto-remove; \ rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ @@ -123,7 +123,7 @@ RUN set -ex; \ ENV CASSANDRA_CONFIG /etc/cassandra -RUN set -ex; \ +RUN set -eux; \ \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index b07c78b..cd52444 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -4,9 +4,10 @@ FROM debian:stretch-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra -RUN set -ex; \ +RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ + gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" libjemalloc1 \ # free is used by cassandra-env.sh @@ -14,28 +15,27 @@ RUN set -ex; \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ ; \ - if ! command -v gpg > /dev/null; then \ - apt-get install -y --no-install-recommends \ - dirmngr \ - gnupg \ - ; \ - fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root ENV GOSU_VERSION 1.10 -RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && { command -v gpgconf && gpgconf --kill all || :; } \ - && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ - && chmod +x /usr/local/bin/gosu \ - && gosu nobody true \ - && apt-get purge -y --auto-remove ca-certificates wget +RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates wget; \ + rm -rf /var/lib/apt/lists/*; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc"; \ + 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; \ + chmod +x /usr/local/bin/gosu; \ + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + gosu nobody true # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ @@ -43,7 +43,7 @@ ENV GPG_KEYS \ 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA -RUN set -ex; \ +RUN set -eux; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ @@ -55,7 +55,7 @@ RUN set -ex; \ ENV CASSANDRA_VERSION 2.2.14 -RUN set -ex; \ +RUN set -eux; \ \ # https://bugs.debian.org/877677 # update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory @@ -115,7 +115,7 @@ RUN set -ex; \ \ rm -rf /var/lib/apt/lists/*; \ \ - if [ -n "$tempDir" ]; then \ + if [ -n "${tempDir:-}" ]; then \ # if we have leftovers from building, let's purge them (including extra, unnecessary build deps) apt-get purge -y --auto-remove; \ rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ @@ -123,7 +123,7 @@ RUN set -ex; \ ENV CASSANDRA_CONFIG /etc/cassandra -RUN set -ex; \ +RUN set -eux; \ \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 0bb58b6..5aa1256 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -4,9 +4,10 @@ FROM debian:stretch-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra -RUN set -ex; \ +RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ + gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" libjemalloc1 \ # free is used by cassandra-env.sh @@ -14,28 +15,27 @@ RUN set -ex; \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ ; \ - if ! command -v gpg > /dev/null; then \ - apt-get install -y --no-install-recommends \ - dirmngr \ - gnupg \ - ; \ - fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root ENV GOSU_VERSION 1.10 -RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && { command -v gpgconf && gpgconf --kill all || :; } \ - && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ - && chmod +x /usr/local/bin/gosu \ - && gosu nobody true \ - && apt-get purge -y --auto-remove ca-certificates wget +RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates wget; \ + rm -rf /var/lib/apt/lists/*; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc"; \ + 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; \ + chmod +x /usr/local/bin/gosu; \ + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + gosu nobody true # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ @@ -43,7 +43,7 @@ ENV GPG_KEYS \ 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA -RUN set -ex; \ +RUN set -eux; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ @@ -55,7 +55,7 @@ RUN set -ex; \ ENV CASSANDRA_VERSION 3.0.18 -RUN set -ex; \ +RUN set -eux; \ \ # https://bugs.debian.org/877677 # update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory @@ -115,7 +115,7 @@ RUN set -ex; \ \ rm -rf /var/lib/apt/lists/*; \ \ - if [ -n "$tempDir" ]; then \ + if [ -n "${tempDir:-}" ]; then \ # if we have leftovers from building, let's purge them (including extra, unnecessary build deps) apt-get purge -y --auto-remove; \ rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ @@ -123,7 +123,7 @@ RUN set -ex; \ ENV CASSANDRA_CONFIG /etc/cassandra -RUN set -ex; \ +RUN set -eux; \ \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 719f656..f243702 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -4,9 +4,10 @@ FROM debian:stretch-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra -RUN set -ex; \ +RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ + gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" libjemalloc1 \ # free is used by cassandra-env.sh @@ -14,28 +15,27 @@ RUN set -ex; \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ ; \ - if ! command -v gpg > /dev/null; then \ - apt-get install -y --no-install-recommends \ - dirmngr \ - gnupg \ - ; \ - fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root ENV GOSU_VERSION 1.10 -RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && { command -v gpgconf && gpgconf --kill all || :; } \ - && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ - && chmod +x /usr/local/bin/gosu \ - && gosu nobody true \ - && apt-get purge -y --auto-remove ca-certificates wget +RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates wget; \ + rm -rf /var/lib/apt/lists/*; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc"; \ + 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; \ + chmod +x /usr/local/bin/gosu; \ + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + gosu nobody true # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ @@ -43,7 +43,7 @@ ENV GPG_KEYS \ 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA -RUN set -ex; \ +RUN set -eux; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ @@ -55,7 +55,7 @@ RUN set -ex; \ ENV CASSANDRA_VERSION 3.11.4 -RUN set -ex; \ +RUN set -eux; \ \ # https://bugs.debian.org/877677 # update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory @@ -115,7 +115,7 @@ RUN set -ex; \ \ rm -rf /var/lib/apt/lists/*; \ \ - if [ -n "$tempDir" ]; then \ + if [ -n "${tempDir:-}" ]; then \ # if we have leftovers from building, let's purge them (including extra, unnecessary build deps) apt-get purge -y --auto-remove; \ rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ @@ -123,7 +123,7 @@ RUN set -ex; \ ENV CASSANDRA_CONFIG /etc/cassandra -RUN set -ex; \ +RUN set -eux; \ \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ diff --git a/Dockerfile.template b/Dockerfile.template index 333c76a..0358739 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -4,9 +4,10 @@ FROM debian:%%SUITE%% # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra -RUN set -ex; \ +RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ + gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" libjemalloc1 \ # free is used by cassandra-env.sh @@ -14,28 +15,27 @@ RUN set -ex; \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ ; \ - if ! command -v gpg > /dev/null; then \ - apt-get install -y --no-install-recommends \ - dirmngr \ - gnupg \ - ; \ - fi; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root ENV GOSU_VERSION 1.10 -RUN set -x \ - && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget && rm -rf /var/lib/apt/lists/* \ - && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \ - && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \ - && export GNUPGHOME="$(mktemp -d)" \ - && gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ - && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ - && { command -v gpgconf && gpgconf --kill all || :; } \ - && rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc \ - && chmod +x /usr/local/bin/gosu \ - && gosu nobody true \ - && apt-get purge -y --auto-remove ca-certificates wget +RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates wget; \ + rm -rf /var/lib/apt/lists/*; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc"; \ + 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; \ + chmod +x /usr/local/bin/gosu; \ + apt-mark auto '.*' > /dev/null; \ + apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + gosu nobody true # https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys ENV GPG_KEYS \ @@ -43,7 +43,7 @@ ENV GPG_KEYS \ 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA -RUN set -ex; \ +RUN set -eux; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ @@ -55,7 +55,7 @@ RUN set -ex; \ ENV CASSANDRA_VERSION %%CASSANDRA_VERSION%% -RUN set -ex; \ +RUN set -eux; \ \ # https://bugs.debian.org/877677 # update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory @@ -115,7 +115,7 @@ RUN set -ex; \ \ rm -rf /var/lib/apt/lists/*; \ \ - if [ -n "$tempDir" ]; then \ + if [ -n "${tempDir:-}" ]; then \ # if we have leftovers from building, let's purge them (including extra, unnecessary build deps) apt-get purge -y --auto-remove; \ rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ @@ -123,7 +123,7 @@ RUN set -ex; \ ENV CASSANDRA_CONFIG /etc/cassandra -RUN set -ex; \ +RUN set -eux; \ \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ From 3efce649c5fc9729483f82d6c9f9ed0e4b73327d Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 3 Sep 2019 15:10:49 -0700 Subject: [PATCH 092/223] Update generated README Especially to link to put-shared jobs (https://doi-janky.infosiftr.net/job/put-shared/) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index afe1e15..4275c71 100644 --- a/README.md +++ b/README.md @@ -20,5 +20,6 @@ For outstanding `cassandra` image PRs, check [PRs with the "library/cassandra" l | Build | Status | Badges | (per-arch) | |:-:|:-:|:-:|:-:| | [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra) | [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra) | [![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/cassandra.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/cassandra) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra) | +| [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/cassandra.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/cassandra) | From f98d3fc5282a99cdfe1ec8aa808d6313080137c0 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 5 Sep 2019 16:19:24 -0700 Subject: [PATCH 093/223] Add "numactl" which Cassandra will use automatically --- 2.1/Dockerfile | 4 ++++ 2.2/Dockerfile | 4 ++++ 3.0/Dockerfile | 4 ++++ 3.11/Dockerfile | 4 ++++ Dockerfile.template | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index b75239a..3a7f392 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -14,6 +14,10 @@ RUN set -eux; \ procps \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ +# Cassandra will automatically use numactl if available +# https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 +# https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a + numactl \ ; \ rm -rf /var/lib/apt/lists/* diff --git a/2.2/Dockerfile b/2.2/Dockerfile index cd52444..cc315b9 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -14,6 +14,10 @@ RUN set -eux; \ procps \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ +# Cassandra will automatically use numactl if available +# https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 +# https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a + numactl \ ; \ rm -rf /var/lib/apt/lists/* diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 5aa1256..3a22d60 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -14,6 +14,10 @@ RUN set -eux; \ procps \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ +# Cassandra will automatically use numactl if available +# https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 +# https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a + numactl \ ; \ rm -rf /var/lib/apt/lists/* diff --git a/3.11/Dockerfile b/3.11/Dockerfile index f243702..cefd8aa 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -14,6 +14,10 @@ RUN set -eux; \ procps \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ +# Cassandra will automatically use numactl if available +# https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 +# https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a + numactl \ ; \ rm -rf /var/lib/apt/lists/* diff --git a/Dockerfile.template b/Dockerfile.template index 0358739..b8ebe6c 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -14,6 +14,10 @@ RUN set -eux; \ procps \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ +# Cassandra will automatically use numactl if available +# https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 +# https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a + numactl \ ; \ rm -rf /var/lib/apt/lists/* From 2852d6ace9623301bd831e38a6993a73f0a640a1 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 30 Oct 2019 02:25:35 +0000 Subject: [PATCH 094/223] Update to 2.2.15 --- 2.2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index cc315b9..c609d23 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -57,7 +57,7 @@ RUN set -eux; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 2.2.14 +ENV CASSANDRA_VERSION 2.2.15 RUN set -eux; \ \ From 006818b41131828443e1e192a7ad94a84fe668b9 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 30 Oct 2019 02:25:35 +0000 Subject: [PATCH 095/223] Update to 3.0.19 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 3a22d60..242c0f8 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -57,7 +57,7 @@ RUN set -eux; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 3.0.18 +ENV CASSANDRA_VERSION 3.0.19 RUN set -eux; \ \ From e5b7ed497ff74587560682dd4c6a2e9b01f818d9 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 30 Oct 2019 02:25:35 +0000 Subject: [PATCH 096/223] Update to 3.11.5 --- 3.11/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index cefd8aa..f214cda 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -57,7 +57,7 @@ RUN set -eux; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 3.11.4 +ENV CASSANDRA_VERSION 3.11.5 RUN set -eux; \ \ From 0d1a7323d9ad02e9ecba8d2bd0da3adda469ce9c Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 17 Feb 2020 16:03:54 -0800 Subject: [PATCH 097/223] Update to Buster (and https repos, per upstream) --- 2.1/Dockerfile | 16 ++++++++++------ 2.2/Dockerfile | 16 ++++++++++------ 3.0/Dockerfile | 16 ++++++++++------ 3.11/Dockerfile | 16 ++++++++++------ Dockerfile.template | 14 +++++++++----- update.sh | 2 +- 6 files changed, 50 insertions(+), 30 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 3a7f392..e834506 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -1,5 +1,5 @@ # vim:set ft=dockerfile: -FROM debian:stretch-slim +FROM debian:buster-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra @@ -9,7 +9,7 @@ RUN set -eux; \ apt-get install -y --no-install-recommends \ gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc1 \ + libjemalloc2 \ # free is used by cassandra-env.sh procps \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) @@ -18,6 +18,8 @@ RUN set -eux; \ # https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ +# Cassandra's APT repository is served over https + ca-certificates \ ; \ rm -rf /var/lib/apt/lists/* @@ -41,12 +43,14 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ gosu nobody true -# https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys +# https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported - A26E528B271F19B9E5D8E19EA278B781FE4B2BDA + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ +# gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported + A4C465FEA0C552561A392A61E91335D77E3E87CB RUN set -eux; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ @@ -69,7 +73,7 @@ RUN set -eux; \ case "$dpkgArch" in \ amd64|i386) \ # arches officialy included in upstream's repo metadata - echo 'deb http://www.apache.org/dist/cassandra/debian 21x main' > /etc/apt/sources.list.d/cassandra.list; \ + echo 'deb https://downloads.apache.org/cassandra/debian 21x main' > /etc/apt/sources.list.d/cassandra.list; \ apt-get update; \ ;; \ *) \ @@ -96,7 +100,7 @@ RUN set -eux; \ tempDir="$(mktemp -d)"; \ for pkg in cassandra cassandra-tools; do \ deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "https://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + wget -O "$tempDir/$deb" "https://downloads.apache.org/cassandra/debian/pool/main/c/cassandra/$deb"; \ done; \ \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index c609d23..54ab7ef 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -1,5 +1,5 @@ # vim:set ft=dockerfile: -FROM debian:stretch-slim +FROM debian:buster-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra @@ -9,7 +9,7 @@ RUN set -eux; \ apt-get install -y --no-install-recommends \ gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc1 \ + libjemalloc2 \ # free is used by cassandra-env.sh procps \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) @@ -18,6 +18,8 @@ RUN set -eux; \ # https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ +# Cassandra's APT repository is served over https + ca-certificates \ ; \ rm -rf /var/lib/apt/lists/* @@ -41,12 +43,14 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ gosu nobody true -# https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys +# https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported - A26E528B271F19B9E5D8E19EA278B781FE4B2BDA + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ +# gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported + A4C465FEA0C552561A392A61E91335D77E3E87CB RUN set -eux; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ @@ -69,7 +73,7 @@ RUN set -eux; \ case "$dpkgArch" in \ amd64|i386) \ # arches officialy included in upstream's repo metadata - echo 'deb http://www.apache.org/dist/cassandra/debian 22x main' > /etc/apt/sources.list.d/cassandra.list; \ + echo 'deb https://downloads.apache.org/cassandra/debian 22x main' > /etc/apt/sources.list.d/cassandra.list; \ apt-get update; \ ;; \ *) \ @@ -96,7 +100,7 @@ RUN set -eux; \ tempDir="$(mktemp -d)"; \ for pkg in cassandra cassandra-tools; do \ deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "https://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + wget -O "$tempDir/$deb" "https://downloads.apache.org/cassandra/debian/pool/main/c/cassandra/$deb"; \ done; \ \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 242c0f8..45f79ab 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -1,5 +1,5 @@ # vim:set ft=dockerfile: -FROM debian:stretch-slim +FROM debian:buster-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra @@ -9,7 +9,7 @@ RUN set -eux; \ apt-get install -y --no-install-recommends \ gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc1 \ + libjemalloc2 \ # free is used by cassandra-env.sh procps \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) @@ -18,6 +18,8 @@ RUN set -eux; \ # https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ +# Cassandra's APT repository is served over https + ca-certificates \ ; \ rm -rf /var/lib/apt/lists/* @@ -41,12 +43,14 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ gosu nobody true -# https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys +# https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported - A26E528B271F19B9E5D8E19EA278B781FE4B2BDA + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ +# gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported + A4C465FEA0C552561A392A61E91335D77E3E87CB RUN set -eux; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ @@ -69,7 +73,7 @@ RUN set -eux; \ case "$dpkgArch" in \ amd64|i386) \ # arches officialy included in upstream's repo metadata - echo 'deb http://www.apache.org/dist/cassandra/debian 30x main' > /etc/apt/sources.list.d/cassandra.list; \ + echo 'deb https://downloads.apache.org/cassandra/debian 30x main' > /etc/apt/sources.list.d/cassandra.list; \ apt-get update; \ ;; \ *) \ @@ -96,7 +100,7 @@ RUN set -eux; \ tempDir="$(mktemp -d)"; \ for pkg in cassandra cassandra-tools; do \ deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "https://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + wget -O "$tempDir/$deb" "https://downloads.apache.org/cassandra/debian/pool/main/c/cassandra/$deb"; \ done; \ \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index f214cda..3b647ba 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -1,5 +1,5 @@ # vim:set ft=dockerfile: -FROM debian:stretch-slim +FROM debian:buster-slim # explicitly set user/group IDs RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra @@ -9,7 +9,7 @@ RUN set -eux; \ apt-get install -y --no-install-recommends \ gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc1 \ + libjemalloc2 \ # free is used by cassandra-env.sh procps \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) @@ -18,6 +18,8 @@ RUN set -eux; \ # https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ +# Cassandra's APT repository is served over https + ca-certificates \ ; \ rm -rf /var/lib/apt/lists/* @@ -41,12 +43,14 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ gosu nobody true -# https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys +# https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported - A26E528B271F19B9E5D8E19EA278B781FE4B2BDA + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ +# gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported + A4C465FEA0C552561A392A61E91335D77E3E87CB RUN set -eux; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ @@ -69,7 +73,7 @@ RUN set -eux; \ case "$dpkgArch" in \ amd64|i386) \ # arches officialy included in upstream's repo metadata - echo 'deb http://www.apache.org/dist/cassandra/debian 311x main' > /etc/apt/sources.list.d/cassandra.list; \ + echo 'deb https://downloads.apache.org/cassandra/debian 311x main' > /etc/apt/sources.list.d/cassandra.list; \ apt-get update; \ ;; \ *) \ @@ -96,7 +100,7 @@ RUN set -eux; \ tempDir="$(mktemp -d)"; \ for pkg in cassandra cassandra-tools; do \ deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "https://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + wget -O "$tempDir/$deb" "https://downloads.apache.org/cassandra/debian/pool/main/c/cassandra/$deb"; \ done; \ \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) diff --git a/Dockerfile.template b/Dockerfile.template index b8ebe6c..b2f04f6 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -9,7 +9,7 @@ RUN set -eux; \ apt-get install -y --no-install-recommends \ gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc1 \ + libjemalloc2 \ # free is used by cassandra-env.sh procps \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) @@ -18,6 +18,8 @@ RUN set -eux; \ # https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ +# Cassandra's APT repository is served over https + ca-certificates \ ; \ rm -rf /var/lib/apt/lists/* @@ -41,12 +43,14 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ gosu nobody true -# https://wiki.apache.org/cassandra/DebianPackaging#Adding_Repository_Keys +# https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported - A26E528B271F19B9E5D8E19EA278B781FE4B2BDA + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ +# gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported + A4C465FEA0C552561A392A61E91335D77E3E87CB RUN set -eux; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ @@ -69,7 +73,7 @@ RUN set -eux; \ case "$dpkgArch" in \ amd64|i386) \ # arches officialy included in upstream's repo metadata - echo 'deb http://www.apache.org/dist/cassandra/debian %%CASSANDRA_DIST%%x main' > /etc/apt/sources.list.d/cassandra.list; \ + echo 'deb https://downloads.apache.org/cassandra/debian %%CASSANDRA_DIST%%x main' > /etc/apt/sources.list.d/cassandra.list; \ apt-get update; \ ;; \ *) \ @@ -96,7 +100,7 @@ RUN set -eux; \ tempDir="$(mktemp -d)"; \ for pkg in cassandra cassandra-tools; do \ deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "https://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/$deb"; \ + wget -O "$tempDir/$deb" "https://downloads.apache.org/cassandra/debian/pool/main/c/cassandra/$deb"; \ done; \ \ # create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) diff --git a/update.sh b/update.sh index a97a779..96122c9 100755 --- a/update.sh +++ b/update.sh @@ -4,7 +4,7 @@ set -Eeuo pipefail cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" # -slim is automatically added -defaultDebianSuite='stretch' +defaultDebianSuite='buster' declare -A debianSuite=( #[2.2]='jessie' ) From e14dfcde674cf0464db25dd94977a4eb829d6a43 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 17 Feb 2020 16:05:55 -0800 Subject: [PATCH 098/223] Update to 2.2.16 --- 2.2/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 54ab7ef..e0715e8 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -61,7 +61,7 @@ RUN set -eux; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 2.2.15 +ENV CASSANDRA_VERSION 2.2.16 RUN set -eux; \ \ From 65f2c6a19938619155b1e09817168578d9970b11 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 17 Feb 2020 16:06:05 -0800 Subject: [PATCH 099/223] Update to 3.0.20 --- 3.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 45f79ab..1b5f33a 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -61,7 +61,7 @@ RUN set -eux; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 3.0.19 +ENV CASSANDRA_VERSION 3.0.20 RUN set -eux; \ \ From 11a1ede65cfd34b2f736faef42168ca2285dd35f Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 17 Feb 2020 16:06:11 -0800 Subject: [PATCH 100/223] Update to 3.11.6 --- 3.11/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 3b647ba..131ebf8 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -61,7 +61,7 @@ RUN set -eux; \ rm -rf "$GNUPGHOME"; \ apt-key list -ENV CASSANDRA_VERSION 3.11.5 +ENV CASSANDRA_VERSION 3.11.6 RUN set -eux; \ \ From de006e2143c7685102fcc790aec32ebdf1cf7789 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 21 Feb 2020 13:28:48 -0800 Subject: [PATCH 101/223] Switch from using Debian packages to using binary releases The end result should be ~the same (the Debian packages were "Arch: all" anyways), but give us more control over the Java version (since Debian Buster doesn't even have Java 8 anymore and Cassandra doesn't support anything newer until the unreleased 4.0). --- .travis.yml | 4 - 2.1/Dockerfile | 181 +++++++++++++++------------------- 2.1/docker-entrypoint.sh | 8 +- 2.2/Dockerfile | 181 +++++++++++++++------------------- 2.2/docker-entrypoint.sh | 8 +- 3.0/Dockerfile | 181 +++++++++++++++------------------- 3.0/docker-entrypoint.sh | 8 +- 3.11/Dockerfile | 181 +++++++++++++++------------------- 3.11/docker-entrypoint.sh | 8 +- Dockerfile.template | 181 +++++++++++++++------------------- docker-entrypoint.sh | 8 +- generate-stackbrew-library.sh | 48 ++++++--- update.sh | 55 +++++++---- 13 files changed, 496 insertions(+), 556 deletions(-) diff --git a/.travis.yml b/.travis.yml index 36294e4..d3bbb2e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,13 +3,9 @@ services: docker env: - VERSION=3.11 - - VERSION=3.11 ARCH=i386 - VERSION=3.0 - - VERSION=3.0 ARCH=i386 - VERSION=2.2 - - VERSION=2.2 ARCH=i386 - VERSION=2.1 - - VERSION=2.1 ARCH=i386 install: - git clone https://github.com/docker-library/official-images.git ~/official-images diff --git a/2.1/Dockerfile b/2.1/Dockerfile index e834506..e95fcdf 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -1,48 +1,54 @@ -# vim:set ft=dockerfile: -FROM debian:buster-slim +FROM adoptopenjdk:8-jre-hotspot-bionic # explicitly set user/group IDs -RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra +RUN set -eux; \ + groupadd -r cassandra --gid=999; \ + useradd -r -g cassandra --uid=999 cassandra RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ - gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc2 \ -# free is used by cassandra-env.sh + libjemalloc1 \ +# "free" is used by cassandra-env.sh procps \ +# "cqlsh" needs a python interpreter + python \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ # Cassandra will automatically use numactl if available # https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ -# Cassandra's APT repository is served over https - ca-certificates \ ; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.10 +ENV GOSU_VERSION 1.11 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates wget; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ - wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)"; \ - wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc"; \ + dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ 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; \ - chmod +x /usr/local/bin/gosu; \ apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /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 CASSANDRA_HOME /opt/cassandra +ENV CASSANDRA_CONF /etc/cassandra +ENV PATH $CASSANDRA_HOME/bin:$PATH + # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported @@ -51,118 +57,93 @@ ENV GPG_KEYS \ A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -RUN set -eux; \ - export GNUPGHOME="$(mktemp -d)"; \ - for key in $GPG_KEYS; do \ - gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ - done; \ - gpg --batch --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ - command -v gpgconf && gpgconf --kill all || :; \ - rm -rf "$GNUPGHOME"; \ - apt-key list ENV CASSANDRA_VERSION 2.1.21 +ENV CASSANDRA_SHA512 ea2c35f3f9ce2be8eb96df603927c6867613f3e2215132145da2c3015dd1ddf1370d7196ef4485002e7a54fe22c32abd9c659102057f9297b69113bf83d96d0b RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + rm -rf /var/lib/apt/lists/*; \ \ -# https://bugs.debian.org/877677 -# update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory - mkdir -p /usr/share/man/man1/; \ + ddist() { \ + local f="$1"; shift; \ + local distFile="$1"; shift; \ + local success=; \ + local distUrl=; \ + for distUrl in \ +# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 + 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ +# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ + https://www-us.apache.org/dist/ \ + https://www.apache.org/dist/ \ + https://archive.apache.org/dist/ \ + ; do \ + if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + }; \ \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - amd64|i386) \ -# arches officialy included in upstream's repo metadata - echo 'deb https://downloads.apache.org/cassandra/debian 21x main' > /etc/apt/sources.list.d/cassandra.list; \ - apt-get update; \ - ;; \ - *) \ -# we're on an architecture upstream doesn't include in their repo Architectures -# but their provided packages are "Architecture: all" so we can download them directly instead - \ -# save a list of installed packages so build deps can be removed cleanly - savedAptMark="$(apt-mark showmanual)"; \ - \ -# fetch a few build dependencies - apt-get update; \ - apt-get install -y --no-install-recommends \ - wget ca-certificates \ - dpkg-dev \ - ; \ -# we don't remove APT lists here because they get re-downloaded and removed later - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies -# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies) - apt-mark showmanual | xargs apt-mark auto > /dev/null; \ - apt-mark manual $savedAptMark; \ - \ -# download the two "arch: all" packages we need - tempDir="$(mktemp -d)"; \ - for pkg in cassandra cassandra-tools; do \ - deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "https://downloads.apache.org/cassandra/debian/pool/main/c/cassandra/$deb"; \ - done; \ - \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) - ls -lAFh "$tempDir"; \ - ( cd "$tempDir" && dpkg-scanpackages . > Packages ); \ - grep '^Package: ' "$tempDir/Packages"; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ - ;; \ - esac; \ + ddist 'cassandra-bin.tgz' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz"; \ + echo "$CASSANDRA_SHA512 *cassandra-bin.tgz" | sha512sum --check --strict -; \ \ - apt-get install -y \ - cassandra="$CASSANDRA_VERSION" \ - cassandra-tools="$CASSANDRA_VERSION" \ - ; \ + ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ + rm -rf "$GNUPGHOME"; \ \ - rm -rf /var/lib/apt/lists/*; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ - if [ -n "${tempDir:-}" ]; then \ -# if we have leftovers from building, let's purge them (including extra, unnecessary build deps) - apt-get purge -y --auto-remove; \ - rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ - fi - -ENV CASSANDRA_CONFIG /etc/cassandra - -RUN set -eux; \ + mkdir -p "$CASSANDRA_HOME"; \ + tar --extract --file cassandra-bin.tgz --directory "$CASSANDRA_HOME" --strip-components 1; \ + rm cassandra-bin.tgz*; \ + \ + [ ! -e "$CASSANDRA_CONF" ]; \ + mv "$CASSANDRA_HOME/conf" "$CASSANDRA_CONF"; \ + ln -sT "$CASSANDRA_CONF" "$CASSANDRA_HOME/conf"; \ \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ ppc64el) \ # https://issues.apache.org/jira/browse/CASSANDRA-13345 # "The stack size specified is too small, Specify at least 328k" - if grep -q -- '^-Xss' "$CASSANDRA_CONFIG/jvm.options"; then \ + if grep -q -- '^-Xss' "$CASSANDRA_CONF/jvm.options"; then \ # 3.11+ (jvm.options) - grep -- '^-Xss256k$' "$CASSANDRA_CONFIG/jvm.options"; \ - sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONFIG/jvm.options"; \ - grep -- '^-Xss512k$' "$CASSANDRA_CONFIG/jvm.options"; \ - elif grep -q -- '-Xss256k' "$CASSANDRA_CONFIG/cassandra-env.sh"; then \ + grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ + elif grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; then \ # 3.0 (cassandra-env.sh) - sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ - grep -- '-Xss512k' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ fi; \ ;; \ esac; \ \ -# https://issues.apache.org/jira/browse/CASSANDRA-11661 - sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" + mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ + ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ + \ +# smoke test + cassandra -v + +VOLUME /var/lib/cassandra COPY docker-entrypoint.sh /usr/local/bin/ RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] -RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" -VOLUME /var/lib/cassandra - # 7000: intra-node communication # 7001: TLS intra-node communication # 7199: JMX diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh index 6f08ce7..b50a726 100755 --- a/2.1/docker-entrypoint.sh +++ b/2.1/docker-entrypoint.sh @@ -9,7 +9,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - find /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" \ + find "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra \ \! -user cassandra -exec chown cassandra '{}' + exec gosu cassandra "$BASH_SOURCE" "$@" fi @@ -56,7 +56,7 @@ if [ "$1" = 'cassandra' ]; then fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' for yaml in \ @@ -72,7 +72,7 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${yaml^^}" val="${!var}" if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' fi done @@ -81,7 +81,7 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${rackdc^^}" val="${!var}" if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONFIG/cassandra-rackdc.properties" \ + _sed-in-place "$CASSANDRA_CONF/cassandra-rackdc.properties" \ -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' fi done diff --git a/2.2/Dockerfile b/2.2/Dockerfile index e0715e8..f3c88ff 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -1,48 +1,54 @@ -# vim:set ft=dockerfile: -FROM debian:buster-slim +FROM adoptopenjdk:8-jre-hotspot-bionic # explicitly set user/group IDs -RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra +RUN set -eux; \ + groupadd -r cassandra --gid=999; \ + useradd -r -g cassandra --uid=999 cassandra RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ - gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc2 \ -# free is used by cassandra-env.sh + libjemalloc1 \ +# "free" is used by cassandra-env.sh procps \ +# "cqlsh" needs a python interpreter + python \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ # Cassandra will automatically use numactl if available # https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ -# Cassandra's APT repository is served over https - ca-certificates \ ; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.10 +ENV GOSU_VERSION 1.11 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates wget; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ - wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)"; \ - wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc"; \ + dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ 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; \ - chmod +x /usr/local/bin/gosu; \ apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /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 CASSANDRA_HOME /opt/cassandra +ENV CASSANDRA_CONF /etc/cassandra +ENV PATH $CASSANDRA_HOME/bin:$PATH + # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported @@ -51,118 +57,93 @@ ENV GPG_KEYS \ A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -RUN set -eux; \ - export GNUPGHOME="$(mktemp -d)"; \ - for key in $GPG_KEYS; do \ - gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ - done; \ - gpg --batch --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ - command -v gpgconf && gpgconf --kill all || :; \ - rm -rf "$GNUPGHOME"; \ - apt-key list ENV CASSANDRA_VERSION 2.2.16 +ENV CASSANDRA_SHA512 db2026342e876caf790833d49f7ab1a2fbba39bf380384ef66e2da4913f537690a56c97cb2f6ea17f667a0d34aeb406fa658db02aec1121a5ba7134ab59a5cfb RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + rm -rf /var/lib/apt/lists/*; \ \ -# https://bugs.debian.org/877677 -# update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory - mkdir -p /usr/share/man/man1/; \ + ddist() { \ + local f="$1"; shift; \ + local distFile="$1"; shift; \ + local success=; \ + local distUrl=; \ + for distUrl in \ +# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 + 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ +# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ + https://www-us.apache.org/dist/ \ + https://www.apache.org/dist/ \ + https://archive.apache.org/dist/ \ + ; do \ + if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + }; \ \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - amd64|i386) \ -# arches officialy included in upstream's repo metadata - echo 'deb https://downloads.apache.org/cassandra/debian 22x main' > /etc/apt/sources.list.d/cassandra.list; \ - apt-get update; \ - ;; \ - *) \ -# we're on an architecture upstream doesn't include in their repo Architectures -# but their provided packages are "Architecture: all" so we can download them directly instead - \ -# save a list of installed packages so build deps can be removed cleanly - savedAptMark="$(apt-mark showmanual)"; \ - \ -# fetch a few build dependencies - apt-get update; \ - apt-get install -y --no-install-recommends \ - wget ca-certificates \ - dpkg-dev \ - ; \ -# we don't remove APT lists here because they get re-downloaded and removed later - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies -# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies) - apt-mark showmanual | xargs apt-mark auto > /dev/null; \ - apt-mark manual $savedAptMark; \ - \ -# download the two "arch: all" packages we need - tempDir="$(mktemp -d)"; \ - for pkg in cassandra cassandra-tools; do \ - deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "https://downloads.apache.org/cassandra/debian/pool/main/c/cassandra/$deb"; \ - done; \ - \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) - ls -lAFh "$tempDir"; \ - ( cd "$tempDir" && dpkg-scanpackages . > Packages ); \ - grep '^Package: ' "$tempDir/Packages"; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ - ;; \ - esac; \ + ddist 'cassandra-bin.tgz' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz"; \ + echo "$CASSANDRA_SHA512 *cassandra-bin.tgz" | sha512sum --check --strict -; \ \ - apt-get install -y \ - cassandra="$CASSANDRA_VERSION" \ - cassandra-tools="$CASSANDRA_VERSION" \ - ; \ + ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ + rm -rf "$GNUPGHOME"; \ \ - rm -rf /var/lib/apt/lists/*; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ - if [ -n "${tempDir:-}" ]; then \ -# if we have leftovers from building, let's purge them (including extra, unnecessary build deps) - apt-get purge -y --auto-remove; \ - rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ - fi - -ENV CASSANDRA_CONFIG /etc/cassandra - -RUN set -eux; \ + mkdir -p "$CASSANDRA_HOME"; \ + tar --extract --file cassandra-bin.tgz --directory "$CASSANDRA_HOME" --strip-components 1; \ + rm cassandra-bin.tgz*; \ + \ + [ ! -e "$CASSANDRA_CONF" ]; \ + mv "$CASSANDRA_HOME/conf" "$CASSANDRA_CONF"; \ + ln -sT "$CASSANDRA_CONF" "$CASSANDRA_HOME/conf"; \ \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ ppc64el) \ # https://issues.apache.org/jira/browse/CASSANDRA-13345 # "The stack size specified is too small, Specify at least 328k" - if grep -q -- '^-Xss' "$CASSANDRA_CONFIG/jvm.options"; then \ + if grep -q -- '^-Xss' "$CASSANDRA_CONF/jvm.options"; then \ # 3.11+ (jvm.options) - grep -- '^-Xss256k$' "$CASSANDRA_CONFIG/jvm.options"; \ - sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONFIG/jvm.options"; \ - grep -- '^-Xss512k$' "$CASSANDRA_CONFIG/jvm.options"; \ - elif grep -q -- '-Xss256k' "$CASSANDRA_CONFIG/cassandra-env.sh"; then \ + grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ + elif grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; then \ # 3.0 (cassandra-env.sh) - sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ - grep -- '-Xss512k' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ fi; \ ;; \ esac; \ \ -# https://issues.apache.org/jira/browse/CASSANDRA-11661 - sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" + mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ + ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ + \ +# smoke test + cassandra -v + +VOLUME /var/lib/cassandra COPY docker-entrypoint.sh /usr/local/bin/ RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] -RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" -VOLUME /var/lib/cassandra - # 7000: intra-node communication # 7001: TLS intra-node communication # 7199: JMX diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh index 6f08ce7..b50a726 100755 --- a/2.2/docker-entrypoint.sh +++ b/2.2/docker-entrypoint.sh @@ -9,7 +9,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - find /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" \ + find "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra \ \! -user cassandra -exec chown cassandra '{}' + exec gosu cassandra "$BASH_SOURCE" "$@" fi @@ -56,7 +56,7 @@ if [ "$1" = 'cassandra' ]; then fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' for yaml in \ @@ -72,7 +72,7 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${yaml^^}" val="${!var}" if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' fi done @@ -81,7 +81,7 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${rackdc^^}" val="${!var}" if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONFIG/cassandra-rackdc.properties" \ + _sed-in-place "$CASSANDRA_CONF/cassandra-rackdc.properties" \ -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' fi done diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 1b5f33a..c4d5ef8 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -1,48 +1,54 @@ -# vim:set ft=dockerfile: -FROM debian:buster-slim +FROM adoptopenjdk:8-jre-hotspot-bionic # explicitly set user/group IDs -RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra +RUN set -eux; \ + groupadd -r cassandra --gid=999; \ + useradd -r -g cassandra --uid=999 cassandra RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ - gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc2 \ -# free is used by cassandra-env.sh + libjemalloc1 \ +# "free" is used by cassandra-env.sh procps \ +# "cqlsh" needs a python interpreter + python \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ # Cassandra will automatically use numactl if available # https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ -# Cassandra's APT repository is served over https - ca-certificates \ ; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.10 +ENV GOSU_VERSION 1.11 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates wget; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ - wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)"; \ - wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc"; \ + dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ 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; \ - chmod +x /usr/local/bin/gosu; \ apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /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 CASSANDRA_HOME /opt/cassandra +ENV CASSANDRA_CONF /etc/cassandra +ENV PATH $CASSANDRA_HOME/bin:$PATH + # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported @@ -51,118 +57,93 @@ ENV GPG_KEYS \ A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -RUN set -eux; \ - export GNUPGHOME="$(mktemp -d)"; \ - for key in $GPG_KEYS; do \ - gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ - done; \ - gpg --batch --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ - command -v gpgconf && gpgconf --kill all || :; \ - rm -rf "$GNUPGHOME"; \ - apt-key list ENV CASSANDRA_VERSION 3.0.20 +ENV CASSANDRA_SHA512 1a96db1f26cb31e3d04cb67791d4055515b0ea434e0fa2fb2445d44a180c71e7ca5c6436c27059e44b398f623c9623a8fa67d60a084219f0938f9528cd0c1634 RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + rm -rf /var/lib/apt/lists/*; \ \ -# https://bugs.debian.org/877677 -# update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory - mkdir -p /usr/share/man/man1/; \ + ddist() { \ + local f="$1"; shift; \ + local distFile="$1"; shift; \ + local success=; \ + local distUrl=; \ + for distUrl in \ +# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 + 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ +# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ + https://www-us.apache.org/dist/ \ + https://www.apache.org/dist/ \ + https://archive.apache.org/dist/ \ + ; do \ + if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + }; \ \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - amd64|i386) \ -# arches officialy included in upstream's repo metadata - echo 'deb https://downloads.apache.org/cassandra/debian 30x main' > /etc/apt/sources.list.d/cassandra.list; \ - apt-get update; \ - ;; \ - *) \ -# we're on an architecture upstream doesn't include in their repo Architectures -# but their provided packages are "Architecture: all" so we can download them directly instead - \ -# save a list of installed packages so build deps can be removed cleanly - savedAptMark="$(apt-mark showmanual)"; \ - \ -# fetch a few build dependencies - apt-get update; \ - apt-get install -y --no-install-recommends \ - wget ca-certificates \ - dpkg-dev \ - ; \ -# we don't remove APT lists here because they get re-downloaded and removed later - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies -# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies) - apt-mark showmanual | xargs apt-mark auto > /dev/null; \ - apt-mark manual $savedAptMark; \ - \ -# download the two "arch: all" packages we need - tempDir="$(mktemp -d)"; \ - for pkg in cassandra cassandra-tools; do \ - deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "https://downloads.apache.org/cassandra/debian/pool/main/c/cassandra/$deb"; \ - done; \ - \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) - ls -lAFh "$tempDir"; \ - ( cd "$tempDir" && dpkg-scanpackages . > Packages ); \ - grep '^Package: ' "$tempDir/Packages"; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ - ;; \ - esac; \ + ddist 'cassandra-bin.tgz' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz"; \ + echo "$CASSANDRA_SHA512 *cassandra-bin.tgz" | sha512sum --check --strict -; \ \ - apt-get install -y \ - cassandra="$CASSANDRA_VERSION" \ - cassandra-tools="$CASSANDRA_VERSION" \ - ; \ + ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ + rm -rf "$GNUPGHOME"; \ \ - rm -rf /var/lib/apt/lists/*; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ - if [ -n "${tempDir:-}" ]; then \ -# if we have leftovers from building, let's purge them (including extra, unnecessary build deps) - apt-get purge -y --auto-remove; \ - rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ - fi - -ENV CASSANDRA_CONFIG /etc/cassandra - -RUN set -eux; \ + mkdir -p "$CASSANDRA_HOME"; \ + tar --extract --file cassandra-bin.tgz --directory "$CASSANDRA_HOME" --strip-components 1; \ + rm cassandra-bin.tgz*; \ + \ + [ ! -e "$CASSANDRA_CONF" ]; \ + mv "$CASSANDRA_HOME/conf" "$CASSANDRA_CONF"; \ + ln -sT "$CASSANDRA_CONF" "$CASSANDRA_HOME/conf"; \ \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ ppc64el) \ # https://issues.apache.org/jira/browse/CASSANDRA-13345 # "The stack size specified is too small, Specify at least 328k" - if grep -q -- '^-Xss' "$CASSANDRA_CONFIG/jvm.options"; then \ + if grep -q -- '^-Xss' "$CASSANDRA_CONF/jvm.options"; then \ # 3.11+ (jvm.options) - grep -- '^-Xss256k$' "$CASSANDRA_CONFIG/jvm.options"; \ - sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONFIG/jvm.options"; \ - grep -- '^-Xss512k$' "$CASSANDRA_CONFIG/jvm.options"; \ - elif grep -q -- '-Xss256k' "$CASSANDRA_CONFIG/cassandra-env.sh"; then \ + grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ + elif grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; then \ # 3.0 (cassandra-env.sh) - sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ - grep -- '-Xss512k' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ fi; \ ;; \ esac; \ \ -# https://issues.apache.org/jira/browse/CASSANDRA-11661 - sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" + mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ + ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ + \ +# smoke test + cassandra -v + +VOLUME /var/lib/cassandra COPY docker-entrypoint.sh /usr/local/bin/ RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] -RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" -VOLUME /var/lib/cassandra - # 7000: intra-node communication # 7001: TLS intra-node communication # 7199: JMX diff --git a/3.0/docker-entrypoint.sh b/3.0/docker-entrypoint.sh index 6f08ce7..b50a726 100755 --- a/3.0/docker-entrypoint.sh +++ b/3.0/docker-entrypoint.sh @@ -9,7 +9,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - find /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" \ + find "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra \ \! -user cassandra -exec chown cassandra '{}' + exec gosu cassandra "$BASH_SOURCE" "$@" fi @@ -56,7 +56,7 @@ if [ "$1" = 'cassandra' ]; then fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' for yaml in \ @@ -72,7 +72,7 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${yaml^^}" val="${!var}" if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' fi done @@ -81,7 +81,7 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${rackdc^^}" val="${!var}" if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONFIG/cassandra-rackdc.properties" \ + _sed-in-place "$CASSANDRA_CONF/cassandra-rackdc.properties" \ -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' fi done diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 131ebf8..60bd057 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -1,48 +1,54 @@ -# vim:set ft=dockerfile: -FROM debian:buster-slim +FROM adoptopenjdk:8-jre-hotspot-bionic # explicitly set user/group IDs -RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra +RUN set -eux; \ + groupadd -r cassandra --gid=999; \ + useradd -r -g cassandra --uid=999 cassandra RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ - gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc2 \ -# free is used by cassandra-env.sh + libjemalloc1 \ +# "free" is used by cassandra-env.sh procps \ +# "cqlsh" needs a python interpreter + python \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ # Cassandra will automatically use numactl if available # https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ -# Cassandra's APT repository is served over https - ca-certificates \ ; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.10 +ENV GOSU_VERSION 1.11 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates wget; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ - wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)"; \ - wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc"; \ + dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ 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; \ - chmod +x /usr/local/bin/gosu; \ apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /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 CASSANDRA_HOME /opt/cassandra +ENV CASSANDRA_CONF /etc/cassandra +ENV PATH $CASSANDRA_HOME/bin:$PATH + # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported @@ -51,118 +57,93 @@ ENV GPG_KEYS \ A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -RUN set -eux; \ - export GNUPGHOME="$(mktemp -d)"; \ - for key in $GPG_KEYS; do \ - gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ - done; \ - gpg --batch --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ - command -v gpgconf && gpgconf --kill all || :; \ - rm -rf "$GNUPGHOME"; \ - apt-key list ENV CASSANDRA_VERSION 3.11.6 +ENV CASSANDRA_SHA512 0e778f8fb4a050fde3ec174a9ca365e49ef437cd9e61280b6b4dcba950418a3d04a104bb41aed1add858e2acc2513cf7df4065ca5ca751dd1daf60e70adc4042 RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + rm -rf /var/lib/apt/lists/*; \ \ -# https://bugs.debian.org/877677 -# update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory - mkdir -p /usr/share/man/man1/; \ + ddist() { \ + local f="$1"; shift; \ + local distFile="$1"; shift; \ + local success=; \ + local distUrl=; \ + for distUrl in \ +# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 + 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ +# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ + https://www-us.apache.org/dist/ \ + https://www.apache.org/dist/ \ + https://archive.apache.org/dist/ \ + ; do \ + if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + }; \ \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - amd64|i386) \ -# arches officialy included in upstream's repo metadata - echo 'deb https://downloads.apache.org/cassandra/debian 311x main' > /etc/apt/sources.list.d/cassandra.list; \ - apt-get update; \ - ;; \ - *) \ -# we're on an architecture upstream doesn't include in their repo Architectures -# but their provided packages are "Architecture: all" so we can download them directly instead - \ -# save a list of installed packages so build deps can be removed cleanly - savedAptMark="$(apt-mark showmanual)"; \ - \ -# fetch a few build dependencies - apt-get update; \ - apt-get install -y --no-install-recommends \ - wget ca-certificates \ - dpkg-dev \ - ; \ -# we don't remove APT lists here because they get re-downloaded and removed later - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies -# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies) - apt-mark showmanual | xargs apt-mark auto > /dev/null; \ - apt-mark manual $savedAptMark; \ - \ -# download the two "arch: all" packages we need - tempDir="$(mktemp -d)"; \ - for pkg in cassandra cassandra-tools; do \ - deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "https://downloads.apache.org/cassandra/debian/pool/main/c/cassandra/$deb"; \ - done; \ - \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) - ls -lAFh "$tempDir"; \ - ( cd "$tempDir" && dpkg-scanpackages . > Packages ); \ - grep '^Package: ' "$tempDir/Packages"; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ - ;; \ - esac; \ + ddist 'cassandra-bin.tgz' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz"; \ + echo "$CASSANDRA_SHA512 *cassandra-bin.tgz" | sha512sum --check --strict -; \ \ - apt-get install -y \ - cassandra="$CASSANDRA_VERSION" \ - cassandra-tools="$CASSANDRA_VERSION" \ - ; \ + ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ + rm -rf "$GNUPGHOME"; \ \ - rm -rf /var/lib/apt/lists/*; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ - if [ -n "${tempDir:-}" ]; then \ -# if we have leftovers from building, let's purge them (including extra, unnecessary build deps) - apt-get purge -y --auto-remove; \ - rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ - fi - -ENV CASSANDRA_CONFIG /etc/cassandra - -RUN set -eux; \ + mkdir -p "$CASSANDRA_HOME"; \ + tar --extract --file cassandra-bin.tgz --directory "$CASSANDRA_HOME" --strip-components 1; \ + rm cassandra-bin.tgz*; \ + \ + [ ! -e "$CASSANDRA_CONF" ]; \ + mv "$CASSANDRA_HOME/conf" "$CASSANDRA_CONF"; \ + ln -sT "$CASSANDRA_CONF" "$CASSANDRA_HOME/conf"; \ \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ ppc64el) \ # https://issues.apache.org/jira/browse/CASSANDRA-13345 # "The stack size specified is too small, Specify at least 328k" - if grep -q -- '^-Xss' "$CASSANDRA_CONFIG/jvm.options"; then \ + if grep -q -- '^-Xss' "$CASSANDRA_CONF/jvm.options"; then \ # 3.11+ (jvm.options) - grep -- '^-Xss256k$' "$CASSANDRA_CONFIG/jvm.options"; \ - sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONFIG/jvm.options"; \ - grep -- '^-Xss512k$' "$CASSANDRA_CONFIG/jvm.options"; \ - elif grep -q -- '-Xss256k' "$CASSANDRA_CONFIG/cassandra-env.sh"; then \ + grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ + elif grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; then \ # 3.0 (cassandra-env.sh) - sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ - grep -- '-Xss512k' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ fi; \ ;; \ esac; \ \ -# https://issues.apache.org/jira/browse/CASSANDRA-11661 - sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" + mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ + ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ + \ +# smoke test + cassandra -v + +VOLUME /var/lib/cassandra COPY docker-entrypoint.sh /usr/local/bin/ RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] -RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" -VOLUME /var/lib/cassandra - # 7000: intra-node communication # 7001: TLS intra-node communication # 7199: JMX diff --git a/3.11/docker-entrypoint.sh b/3.11/docker-entrypoint.sh index 6f08ce7..b50a726 100755 --- a/3.11/docker-entrypoint.sh +++ b/3.11/docker-entrypoint.sh @@ -9,7 +9,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - find /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" \ + find "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra \ \! -user cassandra -exec chown cassandra '{}' + exec gosu cassandra "$BASH_SOURCE" "$@" fi @@ -56,7 +56,7 @@ if [ "$1" = 'cassandra' ]; then fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' for yaml in \ @@ -72,7 +72,7 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${yaml^^}" val="${!var}" if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' fi done @@ -81,7 +81,7 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${rackdc^^}" val="${!var}" if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONFIG/cassandra-rackdc.properties" \ + _sed-in-place "$CASSANDRA_CONF/cassandra-rackdc.properties" \ -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' fi done diff --git a/Dockerfile.template b/Dockerfile.template index b2f04f6..cc20104 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,48 +1,54 @@ -# vim:set ft=dockerfile: -FROM debian:%%SUITE%% +FROM adoptopenjdk:%%JAVA_VERSION%%-jre-hotspot-bionic # explicitly set user/group IDs -RUN groupadd -r cassandra --gid=999 && useradd -r -g cassandra --uid=999 cassandra +RUN set -eux; \ + groupadd -r cassandra --gid=999; \ + useradd -r -g cassandra --uid=999 cassandra RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ - gnupg dirmngr \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc2 \ -# free is used by cassandra-env.sh + libjemalloc1 \ +# "free" is used by cassandra-env.sh procps \ +# "cqlsh" needs a python interpreter + python3 \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ # Cassandra will automatically use numactl if available # https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ -# Cassandra's APT repository is served over https - ca-certificates \ ; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.10 +ENV GOSU_VERSION 1.11 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates wget; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ - wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)"; \ - wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc"; \ + dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ 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; \ - chmod +x /usr/local/bin/gosu; \ apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /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 CASSANDRA_HOME /opt/cassandra +ENV CASSANDRA_CONF /etc/cassandra +ENV PATH $CASSANDRA_HOME/bin:$PATH + # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys ENV GPG_KEYS \ # gpg: key 0353B12C: public key "T Jake Luciani " imported @@ -51,118 +57,93 @@ ENV GPG_KEYS \ A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -RUN set -eux; \ - export GNUPGHOME="$(mktemp -d)"; \ - for key in $GPG_KEYS; do \ - gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ - done; \ - gpg --batch --export $GPG_KEYS > /etc/apt/trusted.gpg.d/cassandra.gpg; \ - command -v gpgconf && gpgconf --kill all || :; \ - rm -rf "$GNUPGHOME"; \ - apt-key list ENV CASSANDRA_VERSION %%CASSANDRA_VERSION%% +ENV CASSANDRA_SHA512 %%CASSANDRA_SHA512%% RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + rm -rf /var/lib/apt/lists/*; \ \ -# https://bugs.debian.org/877677 -# update-alternatives: error: error creating symbolic link '/usr/share/man/man1/rmid.1.gz.dpkg-tmp': No such file or directory - mkdir -p /usr/share/man/man1/; \ + ddist() { \ + local f="$1"; shift; \ + local distFile="$1"; shift; \ + local success=; \ + local distUrl=; \ + for distUrl in \ +# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 + 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ +# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ + https://www-us.apache.org/dist/ \ + https://www.apache.org/dist/ \ + https://archive.apache.org/dist/ \ + ; do \ + if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + }; \ \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - amd64|i386) \ -# arches officialy included in upstream's repo metadata - echo 'deb https://downloads.apache.org/cassandra/debian %%CASSANDRA_DIST%%x main' > /etc/apt/sources.list.d/cassandra.list; \ - apt-get update; \ - ;; \ - *) \ -# we're on an architecture upstream doesn't include in their repo Architectures -# but their provided packages are "Architecture: all" so we can download them directly instead - \ -# save a list of installed packages so build deps can be removed cleanly - savedAptMark="$(apt-mark showmanual)"; \ - \ -# fetch a few build dependencies - apt-get update; \ - apt-get install -y --no-install-recommends \ - wget ca-certificates \ - dpkg-dev \ - ; \ -# we don't remove APT lists here because they get re-downloaded and removed later - \ -# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies -# (which is done after we install the built packages so we don't have to redownload any overlapping dependencies) - apt-mark showmanual | xargs apt-mark auto > /dev/null; \ - apt-mark manual $savedAptMark; \ - \ -# download the two "arch: all" packages we need - tempDir="$(mktemp -d)"; \ - for pkg in cassandra cassandra-tools; do \ - deb="${pkg}_${CASSANDRA_VERSION}_all.deb"; \ - wget -O "$tempDir/$deb" "https://downloads.apache.org/cassandra/debian/pool/main/c/cassandra/$deb"; \ - done; \ - \ -# create a temporary local APT repo to install from (so that dependency resolution can be handled by APT, as it should be) - ls -lAFh "$tempDir"; \ - ( cd "$tempDir" && dpkg-scanpackages . > Packages ); \ - grep '^Package: ' "$tempDir/Packages"; \ - echo "deb [ trusted=yes ] file://$tempDir ./" > /etc/apt/sources.list.d/temp.list; \ -# work around the following APT issue by using "Acquire::GzipIndexes=false" (overriding "/etc/apt/apt.conf.d/docker-gzip-indexes") -# Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) -# ... -# E: Failed to fetch store:/var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages Could not open file /var/lib/apt/lists/partial/_tmp_tmp.ODWljpQfkE_._Packages - open (13: Permission denied) - apt-get -o Acquire::GzipIndexes=false update; \ - ;; \ - esac; \ + ddist 'cassandra-bin.tgz' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz"; \ + echo "$CASSANDRA_SHA512 *cassandra-bin.tgz" | sha512sum --check --strict -; \ \ - apt-get install -y \ - cassandra="$CASSANDRA_VERSION" \ - cassandra-tools="$CASSANDRA_VERSION" \ - ; \ + ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ + rm -rf "$GNUPGHOME"; \ \ - rm -rf /var/lib/apt/lists/*; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ - if [ -n "${tempDir:-}" ]; then \ -# if we have leftovers from building, let's purge them (including extra, unnecessary build deps) - apt-get purge -y --auto-remove; \ - rm -rf "$tempDir" /etc/apt/sources.list.d/temp.list; \ - fi - -ENV CASSANDRA_CONFIG /etc/cassandra - -RUN set -eux; \ + mkdir -p "$CASSANDRA_HOME"; \ + tar --extract --file cassandra-bin.tgz --directory "$CASSANDRA_HOME" --strip-components 1; \ + rm cassandra-bin.tgz*; \ + \ + [ ! -e "$CASSANDRA_CONF" ]; \ + mv "$CASSANDRA_HOME/conf" "$CASSANDRA_CONF"; \ + ln -sT "$CASSANDRA_CONF" "$CASSANDRA_HOME/conf"; \ \ dpkgArch="$(dpkg --print-architecture)"; \ case "$dpkgArch" in \ ppc64el) \ # https://issues.apache.org/jira/browse/CASSANDRA-13345 # "The stack size specified is too small, Specify at least 328k" - if grep -q -- '^-Xss' "$CASSANDRA_CONFIG/jvm.options"; then \ + if grep -q -- '^-Xss' "$CASSANDRA_CONF/jvm.options"; then \ # 3.11+ (jvm.options) - grep -- '^-Xss256k$' "$CASSANDRA_CONFIG/jvm.options"; \ - sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONFIG/jvm.options"; \ - grep -- '^-Xss512k$' "$CASSANDRA_CONFIG/jvm.options"; \ - elif grep -q -- '-Xss256k' "$CASSANDRA_CONFIG/cassandra-env.sh"; then \ + grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ + elif grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; then \ # 3.0 (cassandra-env.sh) - sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ - grep -- '-Xss512k' "$CASSANDRA_CONFIG/cassandra-env.sh"; \ + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ fi; \ ;; \ esac; \ \ -# https://issues.apache.org/jira/browse/CASSANDRA-11661 - sed -ri 's/^(JVM_PATCH_VERSION)=.*/\1=25/' "$CASSANDRA_CONFIG/cassandra-env.sh" + mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ + ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ + \ +# smoke test + cassandra -v + +VOLUME /var/lib/cassandra COPY docker-entrypoint.sh /usr/local/bin/ RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] -RUN mkdir -p /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chown -R cassandra:cassandra /var/lib/cassandra "$CASSANDRA_CONFIG" \ - && chmod 777 /var/lib/cassandra "$CASSANDRA_CONFIG" -VOLUME /var/lib/cassandra - # 7000: intra-node communication # 7001: TLS intra-node communication # 7199: JMX diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 6f08ce7..b50a726 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -9,7 +9,7 @@ fi # allow the container to be started with `--user` if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - find /var/lib/cassandra /var/log/cassandra "$CASSANDRA_CONFIG" \ + find "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra \ \! -user cassandra -exec chown cassandra '{}' + exec gosu cassandra "$BASH_SOURCE" "$@" fi @@ -56,7 +56,7 @@ if [ "$1" = 'cassandra' ]; then fi : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' for yaml in \ @@ -72,7 +72,7 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${yaml^^}" val="${!var}" if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONFIG/cassandra.yaml" \ + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' fi done @@ -81,7 +81,7 @@ if [ "$1" = 'cassandra' ]; then var="CASSANDRA_${rackdc^^}" val="${!var}" if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONFIG/cassandra-rackdc.properties" \ + _sed-in-place "$CASSANDRA_CONF/cassandra-rackdc.properties" \ -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' fi done diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 7548b87..c58eeb3 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -34,6 +34,22 @@ dirCommit() { ) } +getArches() { + local repo="$1"; shift + local officialImagesUrl='https://github.com/docker-library/official-images/raw/master/library/' + + eval "declare -g -A parentRepoToArches=( $( + find -name 'Dockerfile' -exec awk ' + toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|.*\/.*)(:|$)/ { + print "'"$officialImagesUrl"'" $2 + } + ' '{}' + \ + | sort -u \ + | xargs bashbrew cat --format '[{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"' + ) )" +} +getArches 'cassandra' + cat <<-EOH # this file is generated via https://github.com/docker-library/cassandra/blob/$(fileCommit "$self")/$self @@ -60,23 +76,29 @@ for version in "${versions[@]}"; do fi versionAliases+=( ${aliases[$version]:-} ) - # $ wget -qO- 'https://dl.bintray.com/apache/cassandra/dists/311x/Release' | grep '^Architectures:' - # Architectures: i386 amd64 - arches='amd64 i386' + parent="$(awk 'toupper($1) == "FROM" { print $2 }' "$version/Dockerfile")" + arches="${parentRepoToArches[$parent]}" - # https://github.com/docker-library/cassandra/pull/116#issuecomment-326650640 - # Exception (java.lang.RuntimeException) encountered during startup: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native - # java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native - if [ "$version" != '2.2' ]; then - # on arm64, 2.1 works fine - arches+=' arm64v8' + if [ "$version" = '2.2' ]; then + # https://github.com/docker-library/cassandra/pull/116#issuecomment-326650640 + # Exception (java.lang.RuntimeException) encountered during startup: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native + # java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native + arches="$(sed -r -e 's/ arm64v8 / /g' <<<" $arches ")" fi - if [[ "$version" != 2.* ]]; then - # on ppc64le, 2.x both fail - arches+=' ppc64le' + + if [ "$version" = '2.1' ]; then + # 2.1 fails on arm32v7 + # "A fatal error has been detected by the Java Runtime Environment: Internal Error (os_linux_zero.cpp:254), pid=1, tid=0xf7531460" + arches="$(sed -r -e 's/ arm32v[0-9]+ / /g' <<<" $arches ")" fi - arches="$(echo "$arches" | xargs -n1 | sort)" + # s390x is not actually supported + # https://github.com/docker-library/cassandra/pull/116#issuecomment-326654542 + # https://github.com/docker-library/cassandra/issues/193 + # https://issues.apache.org/jira/browse/CASSANDRA-11054 + arches="$(sed -r -e 's/ s390x / /g' <<<" $arches ")" + + arches="$(xargs -n1 <<<"$arches" | sort)" echo cat <<-EOE diff --git a/update.sh b/update.sh index 96122c9..0140187 100755 --- a/update.sh +++ b/update.sh @@ -3,10 +3,10 @@ set -Eeuo pipefail cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" -# -slim is automatically added -defaultDebianSuite='buster' -declare -A debianSuite=( - #[2.2]='jessie' +# TODO update to 11 for 4.0 (https://issues.apache.org/jira/browse/CASSANDRA-9608) +defaultJavaVersion='8' +declare -A javaVersions=( + #[2.2]='8' ) versions=( "$@" ) @@ -17,25 +17,35 @@ versions=( "${versions[@]%/}" ) travisEnv= for version in "${versions[@]}"; do - dist="${version//./}" - packagesUrl="https://www.apache.org/dist/cassandra/debian/dists/${dist}x/main/binary-amd64/Packages.gz" - fullVersion="$( - curl -fsSL "$packagesUrl" \ - | gunzip \ - | awk -F ': ' ' - $1 == "Package" { pkg = $2 } - pkg == "cassandra" && $1 == "Version" { print $2 } - ' - )" + possibleVersions=( $( + git ls-remote --tags 'https://gitbox.apache.org/repos/asf/cassandra.git' "refs/tags/cassandra-$version*" \ + | cut -d/ -f3- \ + | cut -d^ -f1 \ + | cut -d- -f2- \ + | sort -urV + ) ) + + fullVersion= + sha512= + for possibleVersion in "${possibleVersions[@]}"; do + if sha512="$(wget -qO- "https://downloads.apache.org/cassandra/$possibleVersion/apache-cassandra-$possibleVersion-bin.tar.gz.sha512" | grep -oE '[a-f0-9]{128}')" && [ -n "$sha512" ]; then + fullVersion="$possibleVersion" + break + fi + done + if [ -z "$fullVersion" ]; then + echo >&2 "error: failed to find full version for $version" + exit 1 + fi echo "$version: $fullVersion" - versionSuite="${debianSuite[$version]:-$defaultDebianSuite}-slim" + javaVersion="${javaVersions[$version]:-$defaultJavaVersion}" cp -a docker-entrypoint.sh "$version/" sed \ - -e 's/%%CASSANDRA_DIST%%/'$dist'/g;' \ - -e 's/%%CASSANDRA_VERSION%%/'$fullVersion'/g' \ - -e 's/%%SUITE%%/'$versionSuite'/g;' \ + -e "s/%%CASSANDRA_VERSION%%/$fullVersion/g" \ + -e "s/%%CASSANDRA_SHA512%%/$sha512/g" \ + -e "s/%%JAVA_VERSION%%/$javaVersion/g" \ Dockerfile.template > "$version/Dockerfile" # remove the "/docker-entrypoint.sh" backwards-compatibility symlink in Cassandra 3.12+ @@ -45,7 +55,14 @@ for version in "${versions[@]}"; do esac # TODO once Cassandra 2.x and 3.x are deprecated, we should remove this from the template itself (and remove this code too) - travisEnv='\n - VERSION='"$version ARCH=i386$travisEnv" + # python3 is only supported in 4.0+ + # https://issues.apache.org/jira/browse/CASSANDRA-10190 + case "$version" in + 2.* | 3.*) + sed -i 's/python3/python/g' "$version/Dockerfile" + ;; + esac + travisEnv='\n - VERSION='"$version$travisEnv" done From 4c146a91f56dc3043284c817f1d61f152199482c Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 16 Apr 2020 00:01:40 -0700 Subject: [PATCH 102/223] Update to gosu 1.12 --- 2.1/Dockerfile | 3 ++- 2.2/Dockerfile | 3 ++- 3.0/Dockerfile | 3 ++- 3.11/Dockerfile | 3 ++- Dockerfile.template | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index e95fcdf..5a1e7c9 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -24,7 +24,8 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.11 +# https://github.com/tianon/gosu/releases +ENV GOSU_VERSION 1.12 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index f3c88ff..0a75d66 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -24,7 +24,8 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.11 +# https://github.com/tianon/gosu/releases +ENV GOSU_VERSION 1.12 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/3.0/Dockerfile b/3.0/Dockerfile index c4d5ef8..4f3f477 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -24,7 +24,8 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.11 +# https://github.com/tianon/gosu/releases +ENV GOSU_VERSION 1.12 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 60bd057..67d93dd 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -24,7 +24,8 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.11 +# https://github.com/tianon/gosu/releases +ENV GOSU_VERSION 1.12 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/Dockerfile.template b/Dockerfile.template index cc20104..c736e13 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -24,7 +24,8 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* # grab gosu for easy step-down from root -ENV GOSU_VERSION 1.11 +# https://github.com/tianon/gosu/releases +ENV GOSU_VERSION 1.12 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ From 2a9347ac366e13ec927113d69bf0e308e4aaa72f Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 28 Apr 2020 14:43:22 -0700 Subject: [PATCH 103/223] Add initial GitHub Actions CI --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 41 ---------------------------------- README.md | 8 +++---- update.sh | 6 ----- 4 files changed, 52 insertions(+), 51 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..155ef31 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: GitHub CI + +on: + pull_request: + push: + schedule: + - cron: 0 0 * * 0 + +defaults: + run: + shell: 'bash -Eeuo pipefail -x {0}' + +jobs: + + generate-jobs: + name: Generate Jobs + runs-on: ubuntu-latest + outputs: + strategy: ${{ steps.generate-jobs.outputs.strategy }} + steps: + - uses: actions/checkout@v1 + - id: generate-jobs + name: Generate Jobs + run: | + git clone --depth 1 https://github.com/docker-library/bashbrew.git -b master ~/bashbrew + strategy="$(~/bashbrew/scripts/github-actions/generate.sh)" + jq . <<<"$strategy" # sanity check / debugging aid + echo "::set-output name=strategy::$strategy" + + test: + needs: generate-jobs + strategy: ${{ fromJson(needs.generate-jobs.outputs.strategy) }} + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v1 + - name: Prepare Environment + run: ${{ matrix.runs.prepare }} + - name: Pull Dependencies + run: ${{ matrix.runs.pull }} + - name: Build ${{ matrix.name }} + run: ${{ matrix.runs.build }} + - name: History ${{ matrix.name }} + run: ${{ matrix.runs.history }} + - name: Test ${{ matrix.name }} + run: ${{ matrix.runs.test }} + - name: '"docker images"' + run: ${{ matrix.runs.images }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d3bbb2e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -language: bash -services: docker - -env: - - VERSION=3.11 - - VERSION=3.0 - - VERSION=2.2 - - VERSION=2.1 - -install: - - git clone https://github.com/docker-library/official-images.git ~/official-images - -before_script: - - env | sort - - wget -qO- 'https://github.com/tianon/pgp-happy-eyeballs/raw/master/hack-my-builds.sh' | bash - - cd "$VERSION" - - image="cassandra:$VERSION" - - | - ( - set -Eeuo pipefail - set -x - if [ -n "${ARCH:-}" ]; then - from="$(awk '$1 == toupper("FROM") { print $2 }' Dockerfile)" - docker pull "$ARCH/$from" - docker tag "$ARCH/$from" "$from" - fi - ) - -script: - - | - ( - set -Eeuo pipefail - set -x - docker build -t "$image" . - ~/official-images/test/run.sh "$image" - ) - -after_script: - - docker images - -# vim:set et ts=2 sw=2: diff --git a/README.md b/README.md index 4275c71..284a01c 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,12 @@ For outstanding `cassandra` image PRs, check [PRs with the "library/cassandra" l --- -- [![build status badge](https://img.shields.io/travis/docker-library/cassandra/master.svg?label=Travis%20CI)](https://travis-ci.org/docker-library/cassandra/branches) -- [![build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/update.sh/job/cassandra.svg?label=Automated%20update.sh)](https://doi-janky.infosiftr.net/job/update.sh/job/cassandra) +- [![build status badge](https://img.shields.io/github/workflow/status/docker-library/cassandra/GitHub%20CI/master?label=GitHub%20CI)](https://github.com/docker-library/cassandra/actions?query=workflow%3A%22GitHub+CI%22+branch%3Amaster) +- [![build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/update.sh/job/cassandra.svg?label=Automated%20update.sh)](https://doi-janky.infosiftr.net/job/update.sh/job/cassandra/) | Build | Status | Badges | (per-arch) | |:-:|:-:|:-:|:-:| -| [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra) | [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra) | [![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/cassandra.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/cassandra) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra) | -| [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/cassandra.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/cassandra) | +| [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra/) | [![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/cassandra.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/cassandra/) | [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra/) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra/) | +| [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/cassandra.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/cassandra/) | diff --git a/update.sh b/update.sh index 0140187..bc0cf97 100755 --- a/update.sh +++ b/update.sh @@ -15,7 +15,6 @@ if [ ${#versions[@]} -eq 0 ]; then fi versions=( "${versions[@]%/}" ) -travisEnv= for version in "${versions[@]}"; do possibleVersions=( $( git ls-remote --tags 'https://gitbox.apache.org/repos/asf/cassandra.git' "refs/tags/cassandra-$version*" \ @@ -62,9 +61,4 @@ for version in "${versions[@]}"; do sed -i 's/python3/python/g' "$version/Dockerfile" ;; esac - - travisEnv='\n - VERSION='"$version$travisEnv" done - -travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)" -echo "$travis" > .travis.yml From 038fd5c0738b5543b2ad2052ceee4f18d7170cae Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 27 Jul 2020 13:38:53 -0700 Subject: [PATCH 104/223] Update to 3.11.7 --- 3.11/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 67d93dd..17a85cc 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -59,8 +59,8 @@ ENV GPG_KEYS \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -ENV CASSANDRA_VERSION 3.11.6 -ENV CASSANDRA_SHA512 0e778f8fb4a050fde3ec174a9ca365e49ef437cd9e61280b6b4dcba950418a3d04a104bb41aed1add858e2acc2513cf7df4065ca5ca751dd1daf60e70adc4042 +ENV CASSANDRA_VERSION 3.11.7 +ENV CASSANDRA_SHA512 c23a51d2d583e707fae8b0e0c413a6287a47af131650715cb3ae8d404b9958fca531c6d73cd196bde5054d2485cc12b6bf195de173f1baa647ac4cc012d9aecd RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ From a39fcee215c6148c3fa4a5c7c66dba7acbc69af7 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 30 Jul 2020 17:16:00 -0700 Subject: [PATCH 105/223] Update to 3.0.21 --- 3.0/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 4f3f477..2a72d50 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -59,8 +59,8 @@ ENV GPG_KEYS \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -ENV CASSANDRA_VERSION 3.0.20 -ENV CASSANDRA_SHA512 1a96db1f26cb31e3d04cb67791d4055515b0ea434e0fa2fb2445d44a180c71e7ca5c6436c27059e44b398f623c9623a8fa67d60a084219f0938f9528cd0c1634 +ENV CASSANDRA_VERSION 3.0.21 +ENV CASSANDRA_SHA512 905ceb18da3391353b3904cdf243b30738167358655d80398d729b8e67fe5b3f1f10a51db19e30c42f7c511b564671785e7654b0892fc79a0fb7c4fda96dbe7b RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ From c03e9828c699b8c22bcb17f82356ae90123d1d10 Mon Sep 17 00:00:00 2001 From: Cyril Scetbon Date: Sat, 15 Aug 2020 21:43:55 -0400 Subject: [PATCH 106/223] add dockerfile for cassandra 4.0 beta --- 4.0/Dockerfile | 154 +++++++++++++++++++++++++++++++++++++++ 4.0/docker-entrypoint.sh | 90 +++++++++++++++++++++++ 2 files changed, 244 insertions(+) create mode 100644 4.0/Dockerfile create mode 100755 4.0/docker-entrypoint.sh diff --git a/4.0/Dockerfile b/4.0/Dockerfile new file mode 100644 index 0000000..ee04f39 --- /dev/null +++ b/4.0/Dockerfile @@ -0,0 +1,154 @@ +FROM adoptopenjdk:8-jre-hotspot-bionic + +# explicitly set user/group IDs +RUN set -eux; \ + groupadd -r cassandra --gid=999; \ + useradd -r -g cassandra --uid=999 cassandra + +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" + libjemalloc1 \ +# "free" is used by cassandra-env.sh + procps \ +# "cqlsh" needs a python interpreter + python \ +# "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) + iproute2 \ +# Cassandra will automatically use numactl if available +# https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 +# https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a + numactl \ + ; \ + rm -rf /var/lib/apt/lists/* + +# grab gosu for easy step-down from root +# https://github.com/tianon/gosu/releases +ENV GOSU_VERSION 1.12 +RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + rm -rf /var/lib/apt/lists/*; \ + dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ + 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 CASSANDRA_HOME /opt/cassandra +ENV CASSANDRA_CONF /etc/cassandra +ENV PATH $CASSANDRA_HOME/bin:$PATH + +# https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys +ENV GPG_KEYS \ +# gpg: key 0353B12C: public key "T Jake Luciani " imported + 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ +# gpg: key FE4B2BDA: public key "Michael Shuler " imported + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ +# gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported + A4C465FEA0C552561A392A61E91335D77E3E87CB + +ENV CASSANDRA_VERSION 4.0-beta1 +ENV CASSANDRA_SHA512 240ae95f78de172333eee865f01b838433845fbd0dceea0eb91ea3a419873f74c5e266cfb62553fa0260849afa7ec5cc65335d037d1455e36b96ddc0f18effc7 + +RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + rm -rf /var/lib/apt/lists/*; \ + \ + ddist() { \ + local f="$1"; shift; \ + local distFile="$1"; shift; \ + local success=; \ + local distUrl=; \ + for distUrl in \ +# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 + 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ +# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ + https://www-us.apache.org/dist/ \ + https://www.apache.org/dist/ \ + https://archive.apache.org/dist/ \ + ; do \ + if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + }; \ + \ + ddist 'cassandra-bin.tgz' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz"; \ + echo "$CASSANDRA_SHA512 *cassandra-bin.tgz" | sha512sum --check --strict -; \ + \ + ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ + rm -rf "$GNUPGHOME"; \ + \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + \ + mkdir -p "$CASSANDRA_HOME"; \ + tar --extract --file cassandra-bin.tgz --directory "$CASSANDRA_HOME" --strip-components 1; \ + rm cassandra-bin.tgz*; \ + \ + [ ! -e "$CASSANDRA_CONF" ]; \ + mv "$CASSANDRA_HOME/conf" "$CASSANDRA_CONF"; \ + ln -sT "$CASSANDRA_CONF" "$CASSANDRA_HOME/conf"; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + ppc64el) \ +# https://issues.apache.org/jira/browse/CASSANDRA-13345 +# "The stack size specified is too small, Specify at least 328k" + if grep -q -- '^-Xss' "$CASSANDRA_CONF/jvm.options"; then \ +# 3.11+ (jvm.options) + grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ + elif grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; then \ +# 3.0 (cassandra-env.sh) + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ + fi; \ + ;; \ + esac; \ + \ + mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ + ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ + \ +# smoke test + cassandra -v + +VOLUME /var/lib/cassandra + +COPY docker-entrypoint.sh /usr/local/bin/ +RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat +ENTRYPOINT ["docker-entrypoint.sh"] + +# 7000: intra-node communication +# 7001: TLS intra-node communication +# 7199: JMX +# 9042: CQL +# 9160: thrift service +EXPOSE 7000 7001 7199 9042 9160 +CMD ["cassandra", "-f"] diff --git a/4.0/docker-entrypoint.sh b/4.0/docker-entrypoint.sh new file mode 100755 index 0000000..b50a726 --- /dev/null +++ b/4.0/docker-entrypoint.sh @@ -0,0 +1,90 @@ +#!/bin/bash +set -e + +# first arg is `-f` or `--some-option` +# or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- cassandra -f "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then + find "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra \ + \! -user cassandra -exec chown cassandra '{}' + + exec gosu cassandra "$BASH_SOURCE" "$@" +fi + +_ip_address() { + # scrape the first non-localhost IP address of the container + # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first + ip address | awk ' + $1 == "inet" && $NF != "lo" { + gsub(/\/.+$/, "", $2) + print $2 + exit + } + ' +} + +# "sed -i", but without "mv" (which doesn't work on a bind-mounted file, for example) +_sed-in-place() { + local filename="$1"; shift + local tempFile + tempFile="$(mktemp)" + sed "$@" "$filename" > "$tempFile" + cat "$tempFile" > "$filename" + rm "$tempFile" +} + +if [ "$1" = 'cassandra' ]; then + : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} + + : ${CASSANDRA_LISTEN_ADDRESS='auto'} + if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then + CASSANDRA_LISTEN_ADDRESS="$(_ip_address)" + fi + + : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} + + if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then + CASSANDRA_BROADCAST_ADDRESS="$(_ip_address)" + fi + : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} + + if [ -n "${CASSANDRA_NAME:+1}" ]; then + : ${CASSANDRA_SEEDS:="cassandra"} + fi + : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} + + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ + -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' + + for yaml in \ + broadcast_address \ + broadcast_rpc_address \ + cluster_name \ + endpoint_snitch \ + listen_address \ + num_tokens \ + rpc_address \ + start_rpc \ + ; do + var="CASSANDRA_${yaml^^}" + val="${!var}" + if [ "$val" ]; then + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ + -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' + fi + done + + for rackdc in dc rack; do + var="CASSANDRA_${rackdc^^}" + val="${!var}" + if [ "$val" ]; then + _sed-in-place "$CASSANDRA_CONF/cassandra-rackdc.properties" \ + -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' + fi + done +fi + +exec "$@" From fa612e0756c13aa95a96f29b1f7fc7384def5070 Mon Sep 17 00:00:00 2001 From: Cyril Scetbon Date: Tue, 25 Aug 2020 22:26:01 -0400 Subject: [PATCH 107/223] Use Java 11 --- 4.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index ee04f39..16de3c4 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -1,4 +1,4 @@ -FROM adoptopenjdk:8-jre-hotspot-bionic +FROM adoptopenjdk:11-jre-hotspot-bionic # explicitly set user/group IDs RUN set -eux; \ From d7cb5f108406918d855509f70cebc37ae6dc1131 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 26 Aug 2020 09:26:39 -0700 Subject: [PATCH 108/223] Adjust update.sh for 4.0 and apply template --- 4.0/Dockerfile | 3 +-- update.sh | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 16de3c4..6e4eb36 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -13,7 +13,7 @@ RUN set -eux; \ # "free" is used by cassandra-env.sh procps \ # "cqlsh" needs a python interpreter - python \ + python3 \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ # Cassandra will automatically use numactl if available @@ -142,7 +142,6 @@ RUN set -eux; \ VOLUME /var/lib/cassandra COPY docker-entrypoint.sh /usr/local/bin/ -RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat ENTRYPOINT ["docker-entrypoint.sh"] # 7000: intra-node communication diff --git a/update.sh b/update.sh index bc0cf97..8bc477f 100755 --- a/update.sh +++ b/update.sh @@ -3,10 +3,12 @@ set -Eeuo pipefail cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" -# TODO update to 11 for 4.0 (https://issues.apache.org/jira/browse/CASSANDRA-9608) -defaultJavaVersion='8' +defaultJavaVersion='11' declare -A javaVersions=( - #[2.2]='8' + [2.1]='8' + [2.2]='8' + [3.0]='8' + [3.11]='8' ) versions=( "$@" ) From c191e1ac6c2fe9973c7ac1f106d395d03ed05eba Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 4 Sep 2020 16:28:04 -0700 Subject: [PATCH 109/223] Add initial jq-based templating engine --- .gitattributes | 3 ++ .github/workflows/verify-templating.yml | 22 +++++++++ .gitignore | 1 + 2.1/Dockerfile | 6 +++ 2.2/Dockerfile | 6 +++ 3.0/Dockerfile | 6 +++ 3.11/Dockerfile | 6 +++ 4.0/Dockerfile | 6 +++ Dockerfile.template | 16 +++++-- apply-templates.sh | 40 ++++++++++++++++ generate-stackbrew-library.sh | 17 +++++-- update.sh | 63 +------------------------ versions.json | 27 +++++++++++ versions.sh | 61 ++++++++++++++++++++++++ 14 files changed, 211 insertions(+), 69 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/verify-templating.yml create mode 100644 .gitignore create mode 100755 apply-templates.sh create mode 100644 versions.json create mode 100755 versions.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f1fb01e --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +**/Dockerfile linguist-generated +**/docker-entrypoint.sh linguist-generated +Dockerfile.template linguist-language=Dockerfile diff --git a/.github/workflows/verify-templating.yml b/.github/workflows/verify-templating.yml new file mode 100644 index 0000000..7e833f1 --- /dev/null +++ b/.github/workflows/verify-templating.yml @@ -0,0 +1,22 @@ +name: Verify Templating + +on: + pull_request: + push: + +defaults: + run: + shell: 'bash -Eeuo pipefail -x {0}' + +jobs: + apply-templates: + name: Check For Uncomitted Changes + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Apply Templates + run: ./apply-templates.sh + - name: Check Git Status + run: | + status="$(git status --short)" + [ -z "$status" ] diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d548f66 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.jq-template.awk diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 5a1e7c9..f8150e4 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -1,3 +1,9 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM adoptopenjdk:8-jre-hotspot-bionic # explicitly set user/group IDs diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 0a75d66..31305f9 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -1,3 +1,9 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM adoptopenjdk:8-jre-hotspot-bionic # explicitly set user/group IDs diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 2a72d50..c7b989c 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -1,3 +1,9 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM adoptopenjdk:8-jre-hotspot-bionic # explicitly set user/group IDs diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 17a85cc..c23e9b0 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -1,3 +1,9 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM adoptopenjdk:8-jre-hotspot-bionic # explicitly set user/group IDs diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 6e4eb36..ba46595 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -1,3 +1,9 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM adoptopenjdk:11-jre-hotspot-bionic # explicitly set user/group IDs diff --git a/Dockerfile.template b/Dockerfile.template index c736e13..d2e9b6e 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,4 +1,4 @@ -FROM adoptopenjdk:%%JAVA_VERSION%%-jre-hotspot-bionic +FROM adoptopenjdk:{{ .java }}-jre-hotspot-bionic # explicitly set user/group IDs RUN set -eux; \ @@ -13,7 +13,15 @@ RUN set -eux; \ # "free" is used by cassandra-env.sh procps \ # "cqlsh" needs a python interpreter +{{ + # python3 is only supported in 4.0+ + # https://issues.apache.org/jira/browse/CASSANDRA-10190 + if env.version | split(".") | .[0] | tonumber < 4 then ( +-}} + python \ +{{ ) else ( -}} python3 \ +{{ ) end -}} # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ # Cassandra will automatically use numactl if available @@ -59,8 +67,8 @@ ENV GPG_KEYS \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -ENV CASSANDRA_VERSION %%CASSANDRA_VERSION%% -ENV CASSANDRA_SHA512 %%CASSANDRA_SHA512%% +ENV CASSANDRA_VERSION {{ .version }} +ENV CASSANDRA_SHA512 {{ .sha512 }} RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ @@ -142,7 +150,9 @@ RUN set -eux; \ VOLUME /var/lib/cassandra COPY docker-entrypoint.sh /usr/local/bin/ +{{ if env.version | split(".") | .[0] | tonumber < 4 then ( -}} RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat +{{ ) else "" end -}} ENTRYPOINT ["docker-entrypoint.sh"] # 7000: intra-node communication diff --git a/apply-templates.sh b/apply-templates.sh new file mode 100755 index 0000000..f1432df --- /dev/null +++ b/apply-templates.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +[ -f versions.json ] # run "versions.sh" first + +jqt='.jq-template.awk' +if [ -n "${BASHBREW_SCRIPTS:-}" ]; then + jqt="$BASHBREW_SCRIPTS/jq-template.awk" +elif [ "$BASH_SOURCE" -nt "$jqt" ]; then + wget -qO "$jqt" 'https://github.com/docker-library/bashbrew/raw/ac3e8e9541cb362a579b05bec41dd40d1df1c6e6/scripts/jq-template.awk' +fi + +if [ "$#" -eq 0 ]; then + versions="$(jq -r 'keys | map(@sh) | join(" ")' versions.json)" + eval "set -- $versions" +fi + +generated_warning() { + cat <<-EOH + # + # NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" + # + # PLEASE DO NOT EDIT IT DIRECTLY. + # + + EOH +} + +for version; do + export version + + echo "processing $version ..." + + { + generated_warning + gawk -f "$jqt" Dockerfile.template + } > "$version/Dockerfile" + + cp -a docker-entrypoint.sh "$version/" +done diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index c58eeb3..470c813 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -9,8 +9,13 @@ declare -A aliases=( self="$(basename "$BASH_SOURCE")" cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" -versions=( */ ) -versions=( "${versions[@]%/}" ) +if [ "$#" -eq 0 ]; then + versions="$(jq -r 'keys | map(@sh) | join(" ")' versions.json)" + eval "set -- $versions" +fi + +# sort version numbers with highest first +IFS=$'\n'; set -- $(sort -rV <<<"$*"); unset IFS # get the most recent commit which modified any of "$@" fileCommit() { @@ -65,10 +70,10 @@ join() { echo "${out#$sep}" } -for version in "${versions[@]}"; do - commit="$(dirCommit "$version")" +for version; do + export version - fullVersion="$(git show "$commit":"$version/Dockerfile" | awk '$1 == "ENV" && $2 == "CASSANDRA_VERSION" { print $3; exit }')" + fullVersion="$(jq -r '.[env.version].version' versions.json)" versionAliases=( $fullVersion ) if [ "$version" != "$fullVersion" ]; then @@ -100,6 +105,8 @@ for version in "${versions[@]}"; do arches="$(xargs -n1 <<<"$arches" | sort)" + commit="$(dirCommit "$version")" + echo cat <<-EOE Tags: $(join ', ' "${versionAliases[@]}") diff --git a/update.sh b/update.sh index 8bc477f..bac2d75 100755 --- a/update.sh +++ b/update.sh @@ -3,64 +3,5 @@ set -Eeuo pipefail cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" -defaultJavaVersion='11' -declare -A javaVersions=( - [2.1]='8' - [2.2]='8' - [3.0]='8' - [3.11]='8' -) - -versions=( "$@" ) -if [ ${#versions[@]} -eq 0 ]; then - versions=( */ ) -fi -versions=( "${versions[@]%/}" ) - -for version in "${versions[@]}"; do - possibleVersions=( $( - git ls-remote --tags 'https://gitbox.apache.org/repos/asf/cassandra.git' "refs/tags/cassandra-$version*" \ - | cut -d/ -f3- \ - | cut -d^ -f1 \ - | cut -d- -f2- \ - | sort -urV - ) ) - - fullVersion= - sha512= - for possibleVersion in "${possibleVersions[@]}"; do - if sha512="$(wget -qO- "https://downloads.apache.org/cassandra/$possibleVersion/apache-cassandra-$possibleVersion-bin.tar.gz.sha512" | grep -oE '[a-f0-9]{128}')" && [ -n "$sha512" ]; then - fullVersion="$possibleVersion" - break - fi - done - if [ -z "$fullVersion" ]; then - echo >&2 "error: failed to find full version for $version" - exit 1 - fi - - echo "$version: $fullVersion" - - javaVersion="${javaVersions[$version]:-$defaultJavaVersion}" - cp -a docker-entrypoint.sh "$version/" - sed \ - -e "s/%%CASSANDRA_VERSION%%/$fullVersion/g" \ - -e "s/%%CASSANDRA_SHA512%%/$sha512/g" \ - -e "s/%%JAVA_VERSION%%/$javaVersion/g" \ - Dockerfile.template > "$version/Dockerfile" - - # remove the "/docker-entrypoint.sh" backwards-compatibility symlink in Cassandra 3.12+ - case "$version" in - 2.*|3.0|3.11) ;; - *) sed -i '/^RUN .* \/docker-entrypoint.sh # backwards compat$/d' "$version/Dockerfile" ;; - esac - # TODO once Cassandra 2.x and 3.x are deprecated, we should remove this from the template itself (and remove this code too) - - # python3 is only supported in 4.0+ - # https://issues.apache.org/jira/browse/CASSANDRA-10190 - case "$version" in - 2.* | 3.*) - sed -i 's/python3/python/g' "$version/Dockerfile" - ;; - esac -done +./versions.sh "$@" +./apply-templates.sh "$@" diff --git a/versions.json b/versions.json new file mode 100644 index 0000000..797e03d --- /dev/null +++ b/versions.json @@ -0,0 +1,27 @@ +{ + "2.1": { + "java": "8", + "sha512": "ea2c35f3f9ce2be8eb96df603927c6867613f3e2215132145da2c3015dd1ddf1370d7196ef4485002e7a54fe22c32abd9c659102057f9297b69113bf83d96d0b", + "version": "2.1.21" + }, + "2.2": { + "java": "8", + "sha512": "db2026342e876caf790833d49f7ab1a2fbba39bf380384ef66e2da4913f537690a56c97cb2f6ea17f667a0d34aeb406fa658db02aec1121a5ba7134ab59a5cfb", + "version": "2.2.16" + }, + "3.0": { + "java": "8", + "sha512": "905ceb18da3391353b3904cdf243b30738167358655d80398d729b8e67fe5b3f1f10a51db19e30c42f7c511b564671785e7654b0892fc79a0fb7c4fda96dbe7b", + "version": "3.0.21" + }, + "3.11": { + "java": "8", + "sha512": "c23a51d2d583e707fae8b0e0c413a6287a47af131650715cb3ae8d404b9958fca531c6d73cd196bde5054d2485cc12b6bf195de173f1baa647ac4cc012d9aecd", + "version": "3.11.7" + }, + "4.0": { + "java": "11", + "sha512": "240ae95f78de172333eee865f01b838433845fbd0dceea0eb91ea3a419873f74c5e266cfb62553fa0260849afa7ec5cc65335d037d1455e36b96ddc0f18effc7", + "version": "4.0-beta1" + } +} diff --git a/versions.sh b/versions.sh new file mode 100755 index 0000000..4fe345b --- /dev/null +++ b/versions.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +defaultJavaVersion='11' +declare -A javaVersions=( + [2.1]='8' + [2.2]='8' + [3.0]='8' + [3.11]='8' +) + +cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" + +versions=( "$@" ) +if [ ${#versions[@]} -eq 0 ]; then + versions=( */ ) + json='{}' +else + json="$(< versions.json)" +fi +versions=( "${versions[@]%/}" ) + +for version in "${versions[@]}"; do + export version + + possibleVersions=( $( + git ls-remote --tags 'https://gitbox.apache.org/repos/asf/cassandra.git' "refs/tags/cassandra-$version*" \ + | cut -d/ -f3- \ + | cut -d^ -f1 \ + | cut -d- -f2- \ + | sort -urV + ) ) + + fullVersion= + sha512= + for possibleVersion in "${possibleVersions[@]}"; do + if sha512="$(wget -qO- "https://downloads.apache.org/cassandra/$possibleVersion/apache-cassandra-$possibleVersion-bin.tar.gz.sha512" | grep -oE '[a-f0-9]{128}')" && [ -n "$sha512" ]; then + fullVersion="$possibleVersion" + break + fi + done + if [ -z "$fullVersion" ]; then + echo >&2 "error: failed to find full version for $version" + exit 1 + fi + export fullVersion sha512 + + export javaVersion="${javaVersions[$version]:-$defaultJavaVersion}" + + echo "$version: $fullVersion" + + json="$(jq <<<"$json" -c ' + .[env.version] = { + version: env.fullVersion, + sha512: env.sha512, + java: env.javaVersion, + } + ')" +done + +jq <<<"$json" -S . > versions.json From 3c31ef99aca31c459b2cf57ee0596b4ab8024416 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 4 Sep 2020 23:36:15 +0000 Subject: [PATCH 110/223] Update 2.1 to 2.1.22 --- 2.1/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index f8150e4..b69af42 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -65,8 +65,8 @@ ENV GPG_KEYS \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -ENV CASSANDRA_VERSION 2.1.21 -ENV CASSANDRA_SHA512 ea2c35f3f9ce2be8eb96df603927c6867613f3e2215132145da2c3015dd1ddf1370d7196ef4485002e7a54fe22c32abd9c659102057f9297b69113bf83d96d0b +ENV CASSANDRA_VERSION 2.1.22 +ENV CASSANDRA_SHA512 68c13950f02bc0d03cc70a45ae9ea3786f07248d7e5d4385fe8776c4e5d3b041addd0f9594b2d06e7fe25a3454eac20ed531bdc380e6122b7149d2c8ac5d866b RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 797e03d..8270b56 100644 --- a/versions.json +++ b/versions.json @@ -1,8 +1,8 @@ { "2.1": { "java": "8", - "sha512": "ea2c35f3f9ce2be8eb96df603927c6867613f3e2215132145da2c3015dd1ddf1370d7196ef4485002e7a54fe22c32abd9c659102057f9297b69113bf83d96d0b", - "version": "2.1.21" + "sha512": "68c13950f02bc0d03cc70a45ae9ea3786f07248d7e5d4385fe8776c4e5d3b041addd0f9594b2d06e7fe25a3454eac20ed531bdc380e6122b7149d2c8ac5d866b", + "version": "2.1.22" }, "2.2": { "java": "8", From d9d67aacb2a9777be83d27b01e85771f64aab577 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 4 Sep 2020 23:38:00 +0000 Subject: [PATCH 111/223] Update 3.0 to 3.0.22 --- 3.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index c7b989c..869b953 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -65,8 +65,8 @@ ENV GPG_KEYS \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -ENV CASSANDRA_VERSION 3.0.21 -ENV CASSANDRA_SHA512 905ceb18da3391353b3904cdf243b30738167358655d80398d729b8e67fe5b3f1f10a51db19e30c42f7c511b564671785e7654b0892fc79a0fb7c4fda96dbe7b +ENV CASSANDRA_VERSION 3.0.22 +ENV CASSANDRA_SHA512 c849f64b913f62afe0f21aacfb6e05b8b9b5dc16321f4d35d69225cac49af6d955939e83e1ad901cec91f2ea76feee56cc4c78d24a3dc2b9d1c9583271c4d190 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 8270b56..8f46b1b 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ }, "3.0": { "java": "8", - "sha512": "905ceb18da3391353b3904cdf243b30738167358655d80398d729b8e67fe5b3f1f10a51db19e30c42f7c511b564671785e7654b0892fc79a0fb7c4fda96dbe7b", - "version": "3.0.21" + "sha512": "c849f64b913f62afe0f21aacfb6e05b8b9b5dc16321f4d35d69225cac49af6d955939e83e1ad901cec91f2ea76feee56cc4c78d24a3dc2b9d1c9583271c4d190", + "version": "3.0.22" }, "3.11": { "java": "8", From 48c0cc4587c8b13dfc8d05d82cf68ee18753ca23 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 4 Sep 2020 23:38:45 +0000 Subject: [PATCH 112/223] Update 3.11 to 3.11.8 --- 3.11/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index c23e9b0..3ff5e0a 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -65,8 +65,8 @@ ENV GPG_KEYS \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -ENV CASSANDRA_VERSION 3.11.7 -ENV CASSANDRA_SHA512 c23a51d2d583e707fae8b0e0c413a6287a47af131650715cb3ae8d404b9958fca531c6d73cd196bde5054d2485cc12b6bf195de173f1baa647ac4cc012d9aecd +ENV CASSANDRA_VERSION 3.11.8 +ENV CASSANDRA_SHA512 ece12cafc7aab7f035a5c8505a7a32915f7fe8c2729c7ade69b21d9354e3f0c06fd5e6206e7f066fb1e525162213fa295200cd46fd1a8bf4b27c9bc834a86c43 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 8f46b1b..15f0507 100644 --- a/versions.json +++ b/versions.json @@ -16,8 +16,8 @@ }, "3.11": { "java": "8", - "sha512": "c23a51d2d583e707fae8b0e0c413a6287a47af131650715cb3ae8d404b9958fca531c6d73cd196bde5054d2485cc12b6bf195de173f1baa647ac4cc012d9aecd", - "version": "3.11.7" + "sha512": "ece12cafc7aab7f035a5c8505a7a32915f7fe8c2729c7ade69b21d9354e3f0c06fd5e6206e7f066fb1e525162213fa295200cd46fd1a8bf4b27c9bc834a86c43", + "version": "3.11.8" }, "4.0": { "java": "11", From b6554329fe112243d16861b441067227eedcbdf9 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 4 Sep 2020 23:39:28 +0000 Subject: [PATCH 113/223] Update 4.0 to 4.0-beta2 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index ba46595..03cc9a3 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -65,8 +65,8 @@ ENV GPG_KEYS \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -ENV CASSANDRA_VERSION 4.0-beta1 -ENV CASSANDRA_SHA512 240ae95f78de172333eee865f01b838433845fbd0dceea0eb91ea3a419873f74c5e266cfb62553fa0260849afa7ec5cc65335d037d1455e36b96ddc0f18effc7 +ENV CASSANDRA_VERSION 4.0-beta2 +ENV CASSANDRA_SHA512 4732a44fc8eadd77309d56e63af548a3320b59c1b659c31d9dc7e7b640dbde34cbf230d3e04087a8e75ccab64fffbdc67ab4cf8b68de193fe85e87bdad007f59 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 15f0507..5f2cf20 100644 --- a/versions.json +++ b/versions.json @@ -21,7 +21,7 @@ }, "4.0": { "java": "11", - "sha512": "240ae95f78de172333eee865f01b838433845fbd0dceea0eb91ea3a419873f74c5e266cfb62553fa0260849afa7ec5cc65335d037d1455e36b96ddc0f18effc7", - "version": "4.0-beta1" + "sha512": "4732a44fc8eadd77309d56e63af548a3320b59c1b659c31d9dc7e7b640dbde34cbf230d3e04087a8e75ccab64fffbdc67ab4cf8b68de193fe85e87bdad007f59", + "version": "4.0-beta2" } } From 871b6f0fd09b310f5dbe7768d2458146db7b2f94 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 16 Oct 2020 16:26:36 -0700 Subject: [PATCH 114/223] Fix .gitattributes specificity --- .gitattributes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index f1fb01e..9396a6b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,3 @@ -**/Dockerfile linguist-generated -**/docker-entrypoint.sh linguist-generated -Dockerfile.template linguist-language=Dockerfile +/*/**/Dockerfile linguist-generated +/*/**/docker-entrypoint.sh linguist-generated +/Dockerfile.template linguist-language=Dockerfile From ac677624ce2dd33c995a55755a2a1dc9918b9a4e Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 2 Nov 2020 10:31:10 -0800 Subject: [PATCH 115/223] Update to Ubuntu Focal This includes a simple workaround for https://issues.apache.org/jira/browse/CASSANDRA-15767 --- 2.1/Dockerfile | 10 +++++++--- 2.2/Dockerfile | 10 +++++++--- 3.0/Dockerfile | 10 +++++++--- 3.11/Dockerfile | 10 +++++++--- 4.0/Dockerfile | 10 +++++++--- Dockerfile.template | 10 +++++++--- 6 files changed, 42 insertions(+), 18 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index b69af42..e8facf8 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM adoptopenjdk:8-jre-hotspot-bionic +FROM adoptopenjdk:8-jre-hotspot-focal # explicitly set user/group IDs RUN set -eux; \ @@ -15,7 +15,7 @@ RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc1 \ + libjemalloc2 \ # "free" is used by cassandra-env.sh procps \ # "cqlsh" needs a python interpreter @@ -27,7 +27,11 @@ RUN set -eux; \ # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ ; \ - rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/*; \ +# https://issues.apache.org/jira/browse/CASSANDRA-15767 ("bin/cassandra" only looks for "libjemalloc.so" or "libjemalloc.so.1" which doesn't match our "libjemalloc.so.2") + libjemalloc="$(readlink -e /usr/lib/*/libjemalloc.so.2)"; \ + ln -sT "$libjemalloc" /usr/local/lib/libjemalloc.so; \ + ldconfig # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 31305f9..dfc6930 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM adoptopenjdk:8-jre-hotspot-bionic +FROM adoptopenjdk:8-jre-hotspot-focal # explicitly set user/group IDs RUN set -eux; \ @@ -15,7 +15,7 @@ RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc1 \ + libjemalloc2 \ # "free" is used by cassandra-env.sh procps \ # "cqlsh" needs a python interpreter @@ -27,7 +27,11 @@ RUN set -eux; \ # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ ; \ - rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/*; \ +# https://issues.apache.org/jira/browse/CASSANDRA-15767 ("bin/cassandra" only looks for "libjemalloc.so" or "libjemalloc.so.1" which doesn't match our "libjemalloc.so.2") + libjemalloc="$(readlink -e /usr/lib/*/libjemalloc.so.2)"; \ + ln -sT "$libjemalloc" /usr/local/lib/libjemalloc.so; \ + ldconfig # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 869b953..2381b82 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM adoptopenjdk:8-jre-hotspot-bionic +FROM adoptopenjdk:8-jre-hotspot-focal # explicitly set user/group IDs RUN set -eux; \ @@ -15,7 +15,7 @@ RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc1 \ + libjemalloc2 \ # "free" is used by cassandra-env.sh procps \ # "cqlsh" needs a python interpreter @@ -27,7 +27,11 @@ RUN set -eux; \ # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ ; \ - rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/*; \ +# https://issues.apache.org/jira/browse/CASSANDRA-15767 ("bin/cassandra" only looks for "libjemalloc.so" or "libjemalloc.so.1" which doesn't match our "libjemalloc.so.2") + libjemalloc="$(readlink -e /usr/lib/*/libjemalloc.so.2)"; \ + ln -sT "$libjemalloc" /usr/local/lib/libjemalloc.so; \ + ldconfig # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 3ff5e0a..80756f9 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM adoptopenjdk:8-jre-hotspot-bionic +FROM adoptopenjdk:8-jre-hotspot-focal # explicitly set user/group IDs RUN set -eux; \ @@ -15,7 +15,7 @@ RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc1 \ + libjemalloc2 \ # "free" is used by cassandra-env.sh procps \ # "cqlsh" needs a python interpreter @@ -27,7 +27,11 @@ RUN set -eux; \ # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ ; \ - rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/*; \ +# https://issues.apache.org/jira/browse/CASSANDRA-15767 ("bin/cassandra" only looks for "libjemalloc.so" or "libjemalloc.so.1" which doesn't match our "libjemalloc.so.2") + libjemalloc="$(readlink -e /usr/lib/*/libjemalloc.so.2)"; \ + ln -sT "$libjemalloc" /usr/local/lib/libjemalloc.so; \ + ldconfig # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 03cc9a3..e95217f 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM adoptopenjdk:11-jre-hotspot-bionic +FROM adoptopenjdk:11-jre-hotspot-focal # explicitly set user/group IDs RUN set -eux; \ @@ -15,7 +15,7 @@ RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc1 \ + libjemalloc2 \ # "free" is used by cassandra-env.sh procps \ # "cqlsh" needs a python interpreter @@ -27,7 +27,11 @@ RUN set -eux; \ # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ ; \ - rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/*; \ +# https://issues.apache.org/jira/browse/CASSANDRA-15767 ("bin/cassandra" only looks for "libjemalloc.so" or "libjemalloc.so.1" which doesn't match our "libjemalloc.so.2") + libjemalloc="$(readlink -e /usr/lib/*/libjemalloc.so.2)"; \ + ln -sT "$libjemalloc" /usr/local/lib/libjemalloc.so; \ + ldconfig # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases diff --git a/Dockerfile.template b/Dockerfile.template index d2e9b6e..113e3c1 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,4 +1,4 @@ -FROM adoptopenjdk:{{ .java }}-jre-hotspot-bionic +FROM adoptopenjdk:{{ .java }}-jre-hotspot-focal # explicitly set user/group IDs RUN set -eux; \ @@ -9,7 +9,7 @@ RUN set -eux; \ apt-get update; \ apt-get install -y --no-install-recommends \ # solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc1 \ + libjemalloc2 \ # "free" is used by cassandra-env.sh procps \ # "cqlsh" needs a python interpreter @@ -29,7 +29,11 @@ RUN set -eux; \ # https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a numactl \ ; \ - rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/*; \ +# https://issues.apache.org/jira/browse/CASSANDRA-15767 ("bin/cassandra" only looks for "libjemalloc.so" or "libjemalloc.so.1" which doesn't match our "libjemalloc.so.2") + libjemalloc="$(readlink -e /usr/lib/*/libjemalloc.so.2)"; \ + ln -sT "$libjemalloc" /usr/local/lib/libjemalloc.so; \ + ldconfig # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases From cb366dd5fdac8654cd6ecab5b97419664a72cde7 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 4 Nov 2020 15:24:14 +0000 Subject: [PATCH 116/223] Update 2.2 to 2.2.19 --- 2.2/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index dfc6930..663149c 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -69,8 +69,8 @@ ENV GPG_KEYS \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -ENV CASSANDRA_VERSION 2.2.16 -ENV CASSANDRA_SHA512 db2026342e876caf790833d49f7ab1a2fbba39bf380384ef66e2da4913f537690a56c97cb2f6ea17f667a0d34aeb406fa658db02aec1121a5ba7134ab59a5cfb +ENV CASSANDRA_VERSION 2.2.19 +ENV CASSANDRA_SHA512 174688cb51ea7f683ace0de158a3ab080b2799c2001c501ede68253d2990d03737396cc7743eee6d65523bbd21f6b10948279691de1a313dc2f4d0d26cf5315b RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 5f2cf20..15a0f67 100644 --- a/versions.json +++ b/versions.json @@ -6,8 +6,8 @@ }, "2.2": { "java": "8", - "sha512": "db2026342e876caf790833d49f7ab1a2fbba39bf380384ef66e2da4913f537690a56c97cb2f6ea17f667a0d34aeb406fa658db02aec1121a5ba7134ab59a5cfb", - "version": "2.2.16" + "sha512": "174688cb51ea7f683ace0de158a3ab080b2799c2001c501ede68253d2990d03737396cc7743eee6d65523bbd21f6b10948279691de1a313dc2f4d0d26cf5315b", + "version": "2.2.19" }, "3.0": { "java": "8", From 32e0b2dc80fa6d3e67da635b379cdf0620728143 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 4 Nov 2020 15:25:34 +0000 Subject: [PATCH 117/223] Update 3.0 to 3.0.23 --- 3.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 2381b82..6baced4 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -69,8 +69,8 @@ ENV GPG_KEYS \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -ENV CASSANDRA_VERSION 3.0.22 -ENV CASSANDRA_SHA512 c849f64b913f62afe0f21aacfb6e05b8b9b5dc16321f4d35d69225cac49af6d955939e83e1ad901cec91f2ea76feee56cc4c78d24a3dc2b9d1c9583271c4d190 +ENV CASSANDRA_VERSION 3.0.23 +ENV CASSANDRA_SHA512 7f41db0148d4b376e83bc09092574df6f5b5c47eb04495175f57dc3a5482a865faaa884a4d9d4d7d4fef588a62c5d92dcca56c337c94c6319ec2433da0428a3a RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 15a0f67..d422a0e 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ }, "3.0": { "java": "8", - "sha512": "c849f64b913f62afe0f21aacfb6e05b8b9b5dc16321f4d35d69225cac49af6d955939e83e1ad901cec91f2ea76feee56cc4c78d24a3dc2b9d1c9583271c4d190", - "version": "3.0.22" + "sha512": "7f41db0148d4b376e83bc09092574df6f5b5c47eb04495175f57dc3a5482a865faaa884a4d9d4d7d4fef588a62c5d92dcca56c337c94c6319ec2433da0428a3a", + "version": "3.0.23" }, "3.11": { "java": "8", From 6fbb6ce475a028c26cd22ac91377887ce453910f Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 4 Nov 2020 15:26:37 +0000 Subject: [PATCH 118/223] Update 3.11 to 3.11.9 --- 3.11/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 80756f9..c19452e 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -69,8 +69,8 @@ ENV GPG_KEYS \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -ENV CASSANDRA_VERSION 3.11.8 -ENV CASSANDRA_SHA512 ece12cafc7aab7f035a5c8505a7a32915f7fe8c2729c7ade69b21d9354e3f0c06fd5e6206e7f066fb1e525162213fa295200cd46fd1a8bf4b27c9bc834a86c43 +ENV CASSANDRA_VERSION 3.11.9 +ENV CASSANDRA_SHA512 ada90233bcbb7bc572c24ff86a2ca2670df2955b1e451c53940faa640306c340e27933eeba013f8d4c4480e3842e5cdcd1563ac825ab4c6b036b5dbac356aa96 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index d422a0e..6619d90 100644 --- a/versions.json +++ b/versions.json @@ -16,8 +16,8 @@ }, "3.11": { "java": "8", - "sha512": "ece12cafc7aab7f035a5c8505a7a32915f7fe8c2729c7ade69b21d9354e3f0c06fd5e6206e7f066fb1e525162213fa295200cd46fd1a8bf4b27c9bc834a86c43", - "version": "3.11.8" + "sha512": "ada90233bcbb7bc572c24ff86a2ca2670df2955b1e451c53940faa640306c340e27933eeba013f8d4c4480e3842e5cdcd1563ac825ab4c6b036b5dbac356aa96", + "version": "3.11.9" }, "4.0": { "java": "11", From 9cb81d5e734b89af2df9e5636e0c207c5f4609e5 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 4 Nov 2020 15:27:41 +0000 Subject: [PATCH 119/223] Update 4.0 to 4.0-beta3 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index e95217f..9299ec8 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -69,8 +69,8 @@ ENV GPG_KEYS \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -ENV CASSANDRA_VERSION 4.0-beta2 -ENV CASSANDRA_SHA512 4732a44fc8eadd77309d56e63af548a3320b59c1b659c31d9dc7e7b640dbde34cbf230d3e04087a8e75ccab64fffbdc67ab4cf8b68de193fe85e87bdad007f59 +ENV CASSANDRA_VERSION 4.0-beta3 +ENV CASSANDRA_SHA512 b40f5be0484208129f788fb658db997cc4103348c2da35392b7d2c5696877a43554ebaea92b448113eb61a540510fc8edc46f1bf181da1308bf656ac7b785703 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 6619d90..bcee6cd 100644 --- a/versions.json +++ b/versions.json @@ -21,7 +21,7 @@ }, "4.0": { "java": "11", - "sha512": "4732a44fc8eadd77309d56e63af548a3320b59c1b659c31d9dc7e7b640dbde34cbf230d3e04087a8e75ccab64fffbdc67ab4cf8b68de193fe85e87bdad007f59", - "version": "4.0-beta2" + "sha512": "b40f5be0484208129f788fb658db997cc4103348c2da35392b7d2c5696877a43554ebaea92b448113eb61a540510fc8edc46f1bf181da1308bf656ac7b785703", + "version": "4.0-beta3" } } From f9c26312a76055bcb81926bc628343167d9f8ccd Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 25 Jan 2021 09:24:28 +0000 Subject: [PATCH 120/223] Update 4.0 to 4.0-beta4 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 9299ec8..ee5011c 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -69,8 +69,8 @@ ENV GPG_KEYS \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported A4C465FEA0C552561A392A61E91335D77E3E87CB -ENV CASSANDRA_VERSION 4.0-beta3 -ENV CASSANDRA_SHA512 b40f5be0484208129f788fb658db997cc4103348c2da35392b7d2c5696877a43554ebaea92b448113eb61a540510fc8edc46f1bf181da1308bf656ac7b785703 +ENV CASSANDRA_VERSION 4.0-beta4 +ENV CASSANDRA_SHA512 af253d45681eeadc23bb7ff76091756781d021c4adea17f1d5b5cbda7fa4a0d6615ca270433827ae739516a1b23e1c2bea06ce7c0264241df21772f911fbb7d4 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index bcee6cd..baed876 100644 --- a/versions.json +++ b/versions.json @@ -21,7 +21,7 @@ }, "4.0": { "java": "11", - "sha512": "b40f5be0484208129f788fb658db997cc4103348c2da35392b7d2c5696877a43554ebaea92b448113eb61a540510fc8edc46f1bf181da1308bf656ac7b785703", - "version": "4.0-beta3" + "sha512": "af253d45681eeadc23bb7ff76091756781d021c4adea17f1d5b5cbda7fa4a0d6615ca270433827ae739516a1b23e1c2bea06ce7c0264241df21772f911fbb7d4", + "version": "4.0-beta4" } } From 4542823efa4a2b91575a65266906b1fe314f839d Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 1 Feb 2021 11:41:00 -0800 Subject: [PATCH 121/223] Add "Alex Petrov" to GPG_KEYS He's in https://www.apache.org/dist/cassandra/KEYS and appears to have signed new releases. --- 2.1/Dockerfile | 4 +++- 2.2/Dockerfile | 4 +++- 3.0/Dockerfile | 4 +++- 3.11/Dockerfile | 4 +++- 4.0/Dockerfile | 4 +++- Dockerfile.template | 4 +++- 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index e8facf8..c09f77a 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -67,7 +67,9 @@ ENV GPG_KEYS \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported - A4C465FEA0C552561A392A61E91335D77E3E87CB + A4C465FEA0C552561A392A61E91335D77E3E87CB \ +# gpg: key F1000962B7F6840C: public key "Alex Petrov " imported + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C ENV CASSANDRA_VERSION 2.1.22 ENV CASSANDRA_SHA512 68c13950f02bc0d03cc70a45ae9ea3786f07248d7e5d4385fe8776c4e5d3b041addd0f9594b2d06e7fe25a3454eac20ed531bdc380e6122b7149d2c8ac5d866b diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 663149c..37d56e9 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -67,7 +67,9 @@ ENV GPG_KEYS \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported - A4C465FEA0C552561A392A61E91335D77E3E87CB + A4C465FEA0C552561A392A61E91335D77E3E87CB \ +# gpg: key F1000962B7F6840C: public key "Alex Petrov " imported + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C ENV CASSANDRA_VERSION 2.2.19 ENV CASSANDRA_SHA512 174688cb51ea7f683ace0de158a3ab080b2799c2001c501ede68253d2990d03737396cc7743eee6d65523bbd21f6b10948279691de1a313dc2f4d0d26cf5315b diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 6baced4..6505a5a 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -67,7 +67,9 @@ ENV GPG_KEYS \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported - A4C465FEA0C552561A392A61E91335D77E3E87CB + A4C465FEA0C552561A392A61E91335D77E3E87CB \ +# gpg: key F1000962B7F6840C: public key "Alex Petrov " imported + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C ENV CASSANDRA_VERSION 3.0.23 ENV CASSANDRA_SHA512 7f41db0148d4b376e83bc09092574df6f5b5c47eb04495175f57dc3a5482a865faaa884a4d9d4d7d4fef588a62c5d92dcca56c337c94c6319ec2433da0428a3a diff --git a/3.11/Dockerfile b/3.11/Dockerfile index c19452e..7e1a001 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -67,7 +67,9 @@ ENV GPG_KEYS \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported - A4C465FEA0C552561A392A61E91335D77E3E87CB + A4C465FEA0C552561A392A61E91335D77E3E87CB \ +# gpg: key F1000962B7F6840C: public key "Alex Petrov " imported + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C ENV CASSANDRA_VERSION 3.11.9 ENV CASSANDRA_SHA512 ada90233bcbb7bc572c24ff86a2ca2670df2955b1e451c53940faa640306c340e27933eeba013f8d4c4480e3842e5cdcd1563ac825ab4c6b036b5dbac356aa96 diff --git a/4.0/Dockerfile b/4.0/Dockerfile index ee5011c..730d653 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -67,7 +67,9 @@ ENV GPG_KEYS \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported - A4C465FEA0C552561A392A61E91335D77E3E87CB + A4C465FEA0C552561A392A61E91335D77E3E87CB \ +# gpg: key F1000962B7F6840C: public key "Alex Petrov " imported + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C ENV CASSANDRA_VERSION 4.0-beta4 ENV CASSANDRA_SHA512 af253d45681eeadc23bb7ff76091756781d021c4adea17f1d5b5cbda7fa4a0d6615ca270433827ae739516a1b23e1c2bea06ce7c0264241df21772f911fbb7d4 diff --git a/Dockerfile.template b/Dockerfile.template index 113e3c1..1f4a3e0 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -69,7 +69,9 @@ ENV GPG_KEYS \ # gpg: key FE4B2BDA: public key "Michael Shuler " imported A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ # gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported - A4C465FEA0C552561A392A61E91335D77E3E87CB + A4C465FEA0C552561A392A61E91335D77E3E87CB \ +# gpg: key F1000962B7F6840C: public key "Alex Petrov " imported + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C ENV CASSANDRA_VERSION {{ .version }} ENV CASSANDRA_SHA512 {{ .sha512 }} From ae74e95f49d635ad12af342bac020ac0453e356f Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 1 Feb 2021 19:44:21 +0000 Subject: [PATCH 122/223] Update 3.0 to 3.0.24 --- 3.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 6505a5a..6607940 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -71,8 +71,8 @@ ENV GPG_KEYS \ # gpg: key F1000962B7F6840C: public key "Alex Petrov " imported 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C -ENV CASSANDRA_VERSION 3.0.23 -ENV CASSANDRA_SHA512 7f41db0148d4b376e83bc09092574df6f5b5c47eb04495175f57dc3a5482a865faaa884a4d9d4d7d4fef588a62c5d92dcca56c337c94c6319ec2433da0428a3a +ENV CASSANDRA_VERSION 3.0.24 +ENV CASSANDRA_SHA512 e3e86890c0f8e08c1bf41aee0600ab12d4130109211a6e8146cfccbe08a003459cc2c64df6822a6ec1451de7391aa1ba00110925d105e48cc1ccdbefbdf71f14 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index baed876..e5e0a88 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ }, "3.0": { "java": "8", - "sha512": "7f41db0148d4b376e83bc09092574df6f5b5c47eb04495175f57dc3a5482a865faaa884a4d9d4d7d4fef588a62c5d92dcca56c337c94c6319ec2433da0428a3a", - "version": "3.0.23" + "sha512": "e3e86890c0f8e08c1bf41aee0600ab12d4130109211a6e8146cfccbe08a003459cc2c64df6822a6ec1451de7391aa1ba00110925d105e48cc1ccdbefbdf71f14", + "version": "3.0.24" }, "3.11": { "java": "8", From 5670b9eb72220c08446731a5aa39bbb1eaec0cbd Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 1 Feb 2021 19:58:00 +0000 Subject: [PATCH 123/223] Update 3.11 to 3.11.10 --- 3.11/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 7e1a001..9904128 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -71,8 +71,8 @@ ENV GPG_KEYS \ # gpg: key F1000962B7F6840C: public key "Alex Petrov " imported 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C -ENV CASSANDRA_VERSION 3.11.9 -ENV CASSANDRA_SHA512 ada90233bcbb7bc572c24ff86a2ca2670df2955b1e451c53940faa640306c340e27933eeba013f8d4c4480e3842e5cdcd1563ac825ab4c6b036b5dbac356aa96 +ENV CASSANDRA_VERSION 3.11.10 +ENV CASSANDRA_SHA512 f229e2dad47ebaeb6bb7ed13ee5cea3bd3ad9994cc9222cabbffa59651e12dbf9a463e99d397a0c4096c61bacb87d34eb4fba4f8ed9da0f0972a3d7225cef36f RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index e5e0a88..a2f62e1 100644 --- a/versions.json +++ b/versions.json @@ -16,8 +16,8 @@ }, "3.11": { "java": "8", - "sha512": "ada90233bcbb7bc572c24ff86a2ca2670df2955b1e451c53940faa640306c340e27933eeba013f8d4c4480e3842e5cdcd1563ac825ab4c6b036b5dbac356aa96", - "version": "3.11.9" + "sha512": "f229e2dad47ebaeb6bb7ed13ee5cea3bd3ad9994cc9222cabbffa59651e12dbf9a463e99d397a0c4096c61bacb87d34eb4fba4f8ed9da0f0972a3d7225cef36f", + "version": "3.11.10" }, "4.0": { "java": "11", From 51b30b5d78616d8db73153dede5df440d0ea7fc4 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Thu, 18 Feb 2021 15:59:32 -0800 Subject: [PATCH 124/223] Ignore link-local addresses when getting IP --- 2.1/docker-entrypoint.sh | 6 +++++- 2.2/docker-entrypoint.sh | 6 +++++- 3.0/docker-entrypoint.sh | 6 +++++- 3.11/docker-entrypoint.sh | 6 +++++- 4.0/docker-entrypoint.sh | 6 +++++- docker-entrypoint.sh | 6 +++++- 6 files changed, 30 insertions(+), 6 deletions(-) diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh index b50a726..6549f83 100755 --- a/2.1/docker-entrypoint.sh +++ b/2.1/docker-entrypoint.sh @@ -18,7 +18,11 @@ _ip_address() { # scrape the first non-localhost IP address of the container # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first ip address | awk ' - $1 == "inet" && $NF != "lo" { + $1 != "inet" { next } # only lines with ip addresses + $NF == "lo" { next } # skip loopback devices + $2 ~ /^127[.]/ { next } # skip loopback addresses + $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses + { gsub(/\/.+$/, "", $2) print $2 exit diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh index b50a726..6549f83 100755 --- a/2.2/docker-entrypoint.sh +++ b/2.2/docker-entrypoint.sh @@ -18,7 +18,11 @@ _ip_address() { # scrape the first non-localhost IP address of the container # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first ip address | awk ' - $1 == "inet" && $NF != "lo" { + $1 != "inet" { next } # only lines with ip addresses + $NF == "lo" { next } # skip loopback devices + $2 ~ /^127[.]/ { next } # skip loopback addresses + $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses + { gsub(/\/.+$/, "", $2) print $2 exit diff --git a/3.0/docker-entrypoint.sh b/3.0/docker-entrypoint.sh index b50a726..6549f83 100755 --- a/3.0/docker-entrypoint.sh +++ b/3.0/docker-entrypoint.sh @@ -18,7 +18,11 @@ _ip_address() { # scrape the first non-localhost IP address of the container # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first ip address | awk ' - $1 == "inet" && $NF != "lo" { + $1 != "inet" { next } # only lines with ip addresses + $NF == "lo" { next } # skip loopback devices + $2 ~ /^127[.]/ { next } # skip loopback addresses + $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses + { gsub(/\/.+$/, "", $2) print $2 exit diff --git a/3.11/docker-entrypoint.sh b/3.11/docker-entrypoint.sh index b50a726..6549f83 100755 --- a/3.11/docker-entrypoint.sh +++ b/3.11/docker-entrypoint.sh @@ -18,7 +18,11 @@ _ip_address() { # scrape the first non-localhost IP address of the container # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first ip address | awk ' - $1 == "inet" && $NF != "lo" { + $1 != "inet" { next } # only lines with ip addresses + $NF == "lo" { next } # skip loopback devices + $2 ~ /^127[.]/ { next } # skip loopback addresses + $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses + { gsub(/\/.+$/, "", $2) print $2 exit diff --git a/4.0/docker-entrypoint.sh b/4.0/docker-entrypoint.sh index b50a726..6549f83 100755 --- a/4.0/docker-entrypoint.sh +++ b/4.0/docker-entrypoint.sh @@ -18,7 +18,11 @@ _ip_address() { # scrape the first non-localhost IP address of the container # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first ip address | awk ' - $1 == "inet" && $NF != "lo" { + $1 != "inet" { next } # only lines with ip addresses + $NF == "lo" { next } # skip loopback devices + $2 ~ /^127[.]/ { next } # skip loopback addresses + $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses + { gsub(/\/.+$/, "", $2) print $2 exit diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index b50a726..6549f83 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -18,7 +18,11 @@ _ip_address() { # scrape the first non-localhost IP address of the container # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first ip address | awk ' - $1 == "inet" && $NF != "lo" { + $1 != "inet" { next } # only lines with ip addresses + $NF == "lo" { next } # skip loopback devices + $2 ~ /^127[.]/ { next } # skip loopback addresses + $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses + { gsub(/\/.+$/, "", $2) print $2 exit From 03bef93db2ff4b5a3cbc954618f08c44ddcb7568 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 20 Apr 2021 16:30:02 -0700 Subject: [PATCH 125/223] Fix arbitrary user support --- 2.1/Dockerfile | 1 + 2.2/Dockerfile | 1 + 3.0/Dockerfile | 1 + 3.11/Dockerfile | 1 + 4.0/Dockerfile | 1 + Dockerfile.template | 1 + 6 files changed, 6 insertions(+) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index c09f77a..7d7461e 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -145,6 +145,7 @@ RUN set -eux; \ mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod -R a+rwX "$CASSANDRA_CONF"; \ ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 37d56e9..3d83f2a 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -145,6 +145,7 @@ RUN set -eux; \ mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod -R a+rwX "$CASSANDRA_CONF"; \ ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ \ diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 6607940..92471fc 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -145,6 +145,7 @@ RUN set -eux; \ mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod -R a+rwX "$CASSANDRA_CONF"; \ ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 9904128..3f637cf 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -145,6 +145,7 @@ RUN set -eux; \ mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod -R a+rwX "$CASSANDRA_CONF"; \ ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ \ diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 730d653..6ed5aa6 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -145,6 +145,7 @@ RUN set -eux; \ mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod -R a+rwX "$CASSANDRA_CONF"; \ ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ \ diff --git a/Dockerfile.template b/Dockerfile.template index 1f4a3e0..2d71ddf 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -147,6 +147,7 @@ RUN set -eux; \ mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod -R a+rwX "$CASSANDRA_CONF"; \ ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ \ From f00a725cc0189ef166ac1d893227651bd81a6996 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Sun, 25 Apr 2021 14:24:29 +0000 Subject: [PATCH 126/223] Update 4.0 to 4.0-rc1 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 6ed5aa6..40013fd 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -71,8 +71,8 @@ ENV GPG_KEYS \ # gpg: key F1000962B7F6840C: public key "Alex Petrov " imported 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C -ENV CASSANDRA_VERSION 4.0-beta4 -ENV CASSANDRA_SHA512 af253d45681eeadc23bb7ff76091756781d021c4adea17f1d5b5cbda7fa4a0d6615ca270433827ae739516a1b23e1c2bea06ce7c0264241df21772f911fbb7d4 +ENV CASSANDRA_VERSION 4.0-rc1 +ENV CASSANDRA_SHA512 68fe510809c44584a48fafc66b87ffdc46eb3ea403af1aae21ad8fbca8c3bbbe484aaf783ad6d20c63fc201f0d04e45f56a16d01b674119da5b3a9e70fa6168d RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index a2f62e1..a14037b 100644 --- a/versions.json +++ b/versions.json @@ -21,7 +21,7 @@ }, "4.0": { "java": "11", - "sha512": "af253d45681eeadc23bb7ff76091756781d021c4adea17f1d5b5cbda7fa4a0d6615ca270433827ae739516a1b23e1c2bea06ce7c0264241df21772f911fbb7d4", - "version": "4.0-beta4" + "sha512": "68fe510809c44584a48fafc66b87ffdc46eb3ea403af1aae21ad8fbca8c3bbbe484aaf783ad6d20c63fc201f0d04e45f56a16d01b674119da5b3a9e70fa6168d", + "version": "4.0-rc1" } } From 6d3117157c726a7d3a8667f56e6fb046cfe18106 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 22 Jun 2021 13:55:17 -0700 Subject: [PATCH 127/223] Switch from SKS to Ubuntu keyserver See also https://github.com/docker-library/faq#openpgp--gnupg-keys-and-verification and https://github.com/tianon/pgp-happy-eyeballs --- 2.1/Dockerfile | 2 +- 2.2/Dockerfile | 2 +- 3.0/Dockerfile | 2 +- 3.11/Dockerfile | 2 +- 4.0/Dockerfile | 2 +- Dockerfile.template | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 7d7461e..8bc3062 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -107,7 +107,7 @@ RUN set -eux; \ ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ - gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ done; \ gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ rm -rf "$GNUPGHOME"; \ diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 3d83f2a..dda5ebb 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -107,7 +107,7 @@ RUN set -eux; \ ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ - gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ done; \ gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ rm -rf "$GNUPGHOME"; \ diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 92471fc..0e35b60 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -107,7 +107,7 @@ RUN set -eux; \ ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ - gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ done; \ gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ rm -rf "$GNUPGHOME"; \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 3f637cf..b7b6f5e 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -107,7 +107,7 @@ RUN set -eux; \ ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ - gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ done; \ gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ rm -rf "$GNUPGHOME"; \ diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 40013fd..7e2920e 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -107,7 +107,7 @@ RUN set -eux; \ ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ - gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ done; \ gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ rm -rf "$GNUPGHOME"; \ diff --git a/Dockerfile.template b/Dockerfile.template index 2d71ddf..2cf1298 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -109,7 +109,7 @@ RUN set -eux; \ ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ export GNUPGHOME="$(mktemp -d)"; \ for key in $GPG_KEYS; do \ - gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ done; \ gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ rm -rf "$GNUPGHOME"; \ From 08bea513f803c366493d823aa81a81d73e21c93f Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 30 Jun 2021 13:27:32 -0700 Subject: [PATCH 128/223] Update 4.0 to 4.0-rc2 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 7e2920e..309be51 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -71,8 +71,8 @@ ENV GPG_KEYS \ # gpg: key F1000962B7F6840C: public key "Alex Petrov " imported 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C -ENV CASSANDRA_VERSION 4.0-rc1 -ENV CASSANDRA_SHA512 68fe510809c44584a48fafc66b87ffdc46eb3ea403af1aae21ad8fbca8c3bbbe484aaf783ad6d20c63fc201f0d04e45f56a16d01b674119da5b3a9e70fa6168d +ENV CASSANDRA_VERSION 4.0-rc2 +ENV CASSANDRA_SHA512 8bb09f2d6b14ce927bd1d41de6fddc0c6171fbb27f1a0e33ab93e36957dc0e117824def11d8029cd5d8481a2b9c029fc9a8f2ec466c2af1009258565d5521f32 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index a14037b..c4caad8 100644 --- a/versions.json +++ b/versions.json @@ -21,7 +21,7 @@ }, "4.0": { "java": "11", - "sha512": "68fe510809c44584a48fafc66b87ffdc46eb3ea403af1aae21ad8fbca8c3bbbe484aaf783ad6d20c63fc201f0d04e45f56a16d01b674119da5b3a9e70fa6168d", - "version": "4.0-rc1" + "sha512": "8bb09f2d6b14ce927bd1d41de6fddc0c6171fbb27f1a0e33ab93e36957dc0e117824def11d8029cd5d8481a2b9c029fc9a8f2ec466c2af1009258565d5521f32", + "version": "4.0-rc2" } } From 701846b06c0e6eb2c15c6ee8f3c2ed33df52a9aa Mon Sep 17 00:00:00 2001 From: Erik Merkle Date: Mon, 26 Jul 2021 16:37:12 -0500 Subject: [PATCH 129/223] Add missing Cassandra GPG keys for 4.0 --- 2.1/Dockerfile | 23 ++++++++++++++++++----- 2.2/Dockerfile | 23 ++++++++++++++++++----- 3.0/Dockerfile | 23 ++++++++++++++++++----- 3.11/Dockerfile | 23 ++++++++++++++++++----- 4.0/Dockerfile | 23 ++++++++++++++++++----- Dockerfile.template | 23 ++++++++++++++++++----- 6 files changed, 108 insertions(+), 30 deletions(-) diff --git a/2.1/Dockerfile b/2.1/Dockerfile index 8bc3062..cc2e82e 100644 --- a/2.1/Dockerfile +++ b/2.1/Dockerfile @@ -61,15 +61,28 @@ ENV CASSANDRA_CONF /etc/cassandra ENV PATH $CASSANDRA_HOME/bin:$PATH # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys +# $ docker run --rm buildpack-deps:buster-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' ENV GPG_KEYS \ -# gpg: key 0353B12C: public key "T Jake Luciani " imported +# Eric Evans + CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ +# Eric Evans + C4965EE9E3015D192CCCF2B6F758CE318D77295D \ +# Sylvain Lebresne (pcmanus) + 5AED1BF378E9A19DADE1BCB34BD736A82B5C1B00 \ +# T Jake Luciani 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ -# gpg: key FE4B2BDA: public key "Michael Shuler " imported +# Michael Shuler A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ -# gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported +# Michael Semb Wever A4C465FEA0C552561A392A61E91335D77E3E87CB \ -# gpg: key F1000962B7F6840C: public key "Alex Petrov " imported - 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C +# Alex Petrov + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C \ +# Jordan West + C4009872C59B49561310D966D0062876AF30F054 \ +# Brandon Williams + B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ +# Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 ENV CASSANDRA_VERSION 2.1.22 ENV CASSANDRA_SHA512 68c13950f02bc0d03cc70a45ae9ea3786f07248d7e5d4385fe8776c4e5d3b041addd0f9594b2d06e7fe25a3454eac20ed531bdc380e6122b7149d2c8ac5d866b diff --git a/2.2/Dockerfile b/2.2/Dockerfile index dda5ebb..934d6fa 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -61,15 +61,28 @@ ENV CASSANDRA_CONF /etc/cassandra ENV PATH $CASSANDRA_HOME/bin:$PATH # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys +# $ docker run --rm buildpack-deps:buster-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' ENV GPG_KEYS \ -# gpg: key 0353B12C: public key "T Jake Luciani " imported +# Eric Evans + CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ +# Eric Evans + C4965EE9E3015D192CCCF2B6F758CE318D77295D \ +# Sylvain Lebresne (pcmanus) + 5AED1BF378E9A19DADE1BCB34BD736A82B5C1B00 \ +# T Jake Luciani 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ -# gpg: key FE4B2BDA: public key "Michael Shuler " imported +# Michael Shuler A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ -# gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported +# Michael Semb Wever A4C465FEA0C552561A392A61E91335D77E3E87CB \ -# gpg: key F1000962B7F6840C: public key "Alex Petrov " imported - 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C +# Alex Petrov + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C \ +# Jordan West + C4009872C59B49561310D966D0062876AF30F054 \ +# Brandon Williams + B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ +# Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 ENV CASSANDRA_VERSION 2.2.19 ENV CASSANDRA_SHA512 174688cb51ea7f683ace0de158a3ab080b2799c2001c501ede68253d2990d03737396cc7743eee6d65523bbd21f6b10948279691de1a313dc2f4d0d26cf5315b diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 0e35b60..9b29329 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -61,15 +61,28 @@ ENV CASSANDRA_CONF /etc/cassandra ENV PATH $CASSANDRA_HOME/bin:$PATH # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys +# $ docker run --rm buildpack-deps:buster-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' ENV GPG_KEYS \ -# gpg: key 0353B12C: public key "T Jake Luciani " imported +# Eric Evans + CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ +# Eric Evans + C4965EE9E3015D192CCCF2B6F758CE318D77295D \ +# Sylvain Lebresne (pcmanus) + 5AED1BF378E9A19DADE1BCB34BD736A82B5C1B00 \ +# T Jake Luciani 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ -# gpg: key FE4B2BDA: public key "Michael Shuler " imported +# Michael Shuler A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ -# gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported +# Michael Semb Wever A4C465FEA0C552561A392A61E91335D77E3E87CB \ -# gpg: key F1000962B7F6840C: public key "Alex Petrov " imported - 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C +# Alex Petrov + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C \ +# Jordan West + C4009872C59B49561310D966D0062876AF30F054 \ +# Brandon Williams + B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ +# Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 ENV CASSANDRA_VERSION 3.0.24 ENV CASSANDRA_SHA512 e3e86890c0f8e08c1bf41aee0600ab12d4130109211a6e8146cfccbe08a003459cc2c64df6822a6ec1451de7391aa1ba00110925d105e48cc1ccdbefbdf71f14 diff --git a/3.11/Dockerfile b/3.11/Dockerfile index b7b6f5e..00553c1 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -61,15 +61,28 @@ ENV CASSANDRA_CONF /etc/cassandra ENV PATH $CASSANDRA_HOME/bin:$PATH # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys +# $ docker run --rm buildpack-deps:buster-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' ENV GPG_KEYS \ -# gpg: key 0353B12C: public key "T Jake Luciani " imported +# Eric Evans + CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ +# Eric Evans + C4965EE9E3015D192CCCF2B6F758CE318D77295D \ +# Sylvain Lebresne (pcmanus) + 5AED1BF378E9A19DADE1BCB34BD736A82B5C1B00 \ +# T Jake Luciani 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ -# gpg: key FE4B2BDA: public key "Michael Shuler " imported +# Michael Shuler A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ -# gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported +# Michael Semb Wever A4C465FEA0C552561A392A61E91335D77E3E87CB \ -# gpg: key F1000962B7F6840C: public key "Alex Petrov " imported - 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C +# Alex Petrov + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C \ +# Jordan West + C4009872C59B49561310D966D0062876AF30F054 \ +# Brandon Williams + B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ +# Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 ENV CASSANDRA_VERSION 3.11.10 ENV CASSANDRA_SHA512 f229e2dad47ebaeb6bb7ed13ee5cea3bd3ad9994cc9222cabbffa59651e12dbf9a463e99d397a0c4096c61bacb87d34eb4fba4f8ed9da0f0972a3d7225cef36f diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 309be51..5016f77 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -61,15 +61,28 @@ ENV CASSANDRA_CONF /etc/cassandra ENV PATH $CASSANDRA_HOME/bin:$PATH # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys +# $ docker run --rm buildpack-deps:buster-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' ENV GPG_KEYS \ -# gpg: key 0353B12C: public key "T Jake Luciani " imported +# Eric Evans + CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ +# Eric Evans + C4965EE9E3015D192CCCF2B6F758CE318D77295D \ +# Sylvain Lebresne (pcmanus) + 5AED1BF378E9A19DADE1BCB34BD736A82B5C1B00 \ +# T Jake Luciani 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ -# gpg: key FE4B2BDA: public key "Michael Shuler " imported +# Michael Shuler A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ -# gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported +# Michael Semb Wever A4C465FEA0C552561A392A61E91335D77E3E87CB \ -# gpg: key F1000962B7F6840C: public key "Alex Petrov " imported - 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C +# Alex Petrov + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C \ +# Jordan West + C4009872C59B49561310D966D0062876AF30F054 \ +# Brandon Williams + B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ +# Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 ENV CASSANDRA_VERSION 4.0-rc2 ENV CASSANDRA_SHA512 8bb09f2d6b14ce927bd1d41de6fddc0c6171fbb27f1a0e33ab93e36957dc0e117824def11d8029cd5d8481a2b9c029fc9a8f2ec466c2af1009258565d5521f32 diff --git a/Dockerfile.template b/Dockerfile.template index 2cf1298..33a639d 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -63,15 +63,28 @@ ENV CASSANDRA_CONF /etc/cassandra ENV PATH $CASSANDRA_HOME/bin:$PATH # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys +# $ docker run --rm buildpack-deps:buster-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' ENV GPG_KEYS \ -# gpg: key 0353B12C: public key "T Jake Luciani " imported +# Eric Evans + CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ +# Eric Evans + C4965EE9E3015D192CCCF2B6F758CE318D77295D \ +# Sylvain Lebresne (pcmanus) + 5AED1BF378E9A19DADE1BCB34BD736A82B5C1B00 \ +# T Jake Luciani 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ -# gpg: key FE4B2BDA: public key "Michael Shuler " imported +# Michael Shuler A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ -# gpg: key E91335D77E3E87CB: public key "Michael Semb Wever " imported +# Michael Semb Wever A4C465FEA0C552561A392A61E91335D77E3E87CB \ -# gpg: key F1000962B7F6840C: public key "Alex Petrov " imported - 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C +# Alex Petrov + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C \ +# Jordan West + C4009872C59B49561310D966D0062876AF30F054 \ +# Brandon Williams + B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ +# Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 ENV CASSANDRA_VERSION {{ .version }} ENV CASSANDRA_SHA512 {{ .sha512 }} From 74d6b84828dbd2668a51a66b492e9aded9e07c40 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Mon, 26 Jul 2021 15:18:23 -0700 Subject: [PATCH 130/223] Bump to 4.0.0 GA --- 4.0/Dockerfile | 4 ++-- generate-stackbrew-library.sh | 3 ++- versions.json | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 5016f77..95273ee 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -84,8 +84,8 @@ ENV GPG_KEYS \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) 3E9C876907A560ACA00964F363E9BAD215BBF5F0 -ENV CASSANDRA_VERSION 4.0-rc2 -ENV CASSANDRA_SHA512 8bb09f2d6b14ce927bd1d41de6fddc0c6171fbb27f1a0e33ab93e36957dc0e117824def11d8029cd5d8481a2b9c029fc9a8f2ec466c2af1009258565d5521f32 +ENV CASSANDRA_VERSION 4.0.0 +ENV CASSANDRA_SHA512 94e923963531b97dbfcf90eb95e423abd9990fae02d1c9a90bf2d76ceb6cd9e422db628b9ec3a45994b3654f1f562f5df84718064722004ae8ba5b5abb11d0b6 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 470c813..075e002 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -3,7 +3,8 @@ set -eu declare -A aliases=( [2.2]='2' - [3.11]='3 latest' + [3.11]='3' + [4.0]='4 latest' ) self="$(basename "$BASH_SOURCE")" diff --git a/versions.json b/versions.json index c4caad8..b7f7e3e 100644 --- a/versions.json +++ b/versions.json @@ -21,7 +21,7 @@ }, "4.0": { "java": "11", - "sha512": "8bb09f2d6b14ce927bd1d41de6fddc0c6171fbb27f1a0e33ab93e36957dc0e117824def11d8029cd5d8481a2b9c029fc9a8f2ec466c2af1009258565d5521f32", - "version": "4.0-rc2" + "sha512": "94e923963531b97dbfcf90eb95e423abd9990fae02d1c9a90bf2d76ceb6cd9e422db628b9ec3a45994b3654f1f562f5df84718064722004ae8ba5b5abb11d0b6", + "version": "4.0.0" } } From 1b76c889fd23ed06cd7411b4ba7a6e92a93fe4ec Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 26 Jul 2021 16:33:18 -0700 Subject: [PATCH 131/223] Exclude riscv64 --- generate-stackbrew-library.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 075e002..1ba5ce4 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -104,6 +104,9 @@ for version; do # https://issues.apache.org/jira/browse/CASSANDRA-11054 arches="$(sed -r -e 's/ s390x / /g' <<<" $arches ")" + # riscv64 doesn't have a proper Java port yet + arches="$(sed -r -e 's/ riscv64 / /g' <<<" $arches ")" + arches="$(xargs -n1 <<<"$arches" | sort)" commit="$(dirCommit "$version")" From abdbbc043a9e41601fdc9f4e44bffaac46e1192f Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 28 Jul 2021 13:24:28 -0700 Subject: [PATCH 132/223] Update 3.0 to 3.0.25 --- 3.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 9b29329..5e9d31f 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -84,8 +84,8 @@ ENV GPG_KEYS \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) 3E9C876907A560ACA00964F363E9BAD215BBF5F0 -ENV CASSANDRA_VERSION 3.0.24 -ENV CASSANDRA_SHA512 e3e86890c0f8e08c1bf41aee0600ab12d4130109211a6e8146cfccbe08a003459cc2c64df6822a6ec1451de7391aa1ba00110925d105e48cc1ccdbefbdf71f14 +ENV CASSANDRA_VERSION 3.0.25 +ENV CASSANDRA_SHA512 a425485a995a8dba998303e368af3cabc322a824f9e42c9e30c4890a0fe186a6bfa19d18b00f2e0336c3c100c6461f191a3e78e201cc91e99f8b80d8df803fdc RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index b7f7e3e..2fa568e 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ }, "3.0": { "java": "8", - "sha512": "e3e86890c0f8e08c1bf41aee0600ab12d4130109211a6e8146cfccbe08a003459cc2c64df6822a6ec1451de7391aa1ba00110925d105e48cc1ccdbefbdf71f14", - "version": "3.0.24" + "sha512": "a425485a995a8dba998303e368af3cabc322a824f9e42c9e30c4890a0fe186a6bfa19d18b00f2e0336c3c100c6461f191a3e78e201cc91e99f8b80d8df803fdc", + "version": "3.0.25" }, "3.11": { "java": "8", From 6d2a0503c7778dd48d3ef718d8d44d38c149a208 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 28 Jul 2021 13:26:44 -0700 Subject: [PATCH 133/223] Update 3.11 to 3.11.11 --- 3.11/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 00553c1..eddfbf9 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -84,8 +84,8 @@ ENV GPG_KEYS \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) 3E9C876907A560ACA00964F363E9BAD215BBF5F0 -ENV CASSANDRA_VERSION 3.11.10 -ENV CASSANDRA_SHA512 f229e2dad47ebaeb6bb7ed13ee5cea3bd3ad9994cc9222cabbffa59651e12dbf9a463e99d397a0c4096c61bacb87d34eb4fba4f8ed9da0f0972a3d7225cef36f +ENV CASSANDRA_VERSION 3.11.11 +ENV CASSANDRA_SHA512 5a7dc4237c9f43526b63cae62f04d73ec60f28e86ee1dd4bd4aaa55d2063d74fe842e015f7f68512db7deadbe52cab37417341183a716c191035463992e42d37 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 2fa568e..855a036 100644 --- a/versions.json +++ b/versions.json @@ -16,8 +16,8 @@ }, "3.11": { "java": "8", - "sha512": "f229e2dad47ebaeb6bb7ed13ee5cea3bd3ad9994cc9222cabbffa59651e12dbf9a463e99d397a0c4096c61bacb87d34eb4fba4f8ed9da0f0972a3d7225cef36f", - "version": "3.11.10" + "sha512": "5a7dc4237c9f43526b63cae62f04d73ec60f28e86ee1dd4bd4aaa55d2063d74fe842e015f7f68512db7deadbe52cab37417341183a716c191035463992e42d37", + "version": "3.11.11" }, "4.0": { "java": "11", From 01825ee7a52ae469fe89e4c83916ce0120a47761 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 30 Jul 2021 11:12:25 -0700 Subject: [PATCH 134/223] Remove 2.1 (now EOL; see https://cassandra.apache.org/_/download.html) --- 2.1/Dockerfile | 180 ---------------------------------- 2.1/docker-entrypoint.sh | 94 ------------------ generate-stackbrew-library.sh | 6 -- versions.json | 5 - versions.sh | 1 - 5 files changed, 286 deletions(-) delete mode 100644 2.1/Dockerfile delete mode 100755 2.1/docker-entrypoint.sh diff --git a/2.1/Dockerfile b/2.1/Dockerfile deleted file mode 100644 index cc2e82e..0000000 --- a/2.1/Dockerfile +++ /dev/null @@ -1,180 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM adoptopenjdk:8-jre-hotspot-focal - -# explicitly set user/group IDs -RUN set -eux; \ - groupadd -r cassandra --gid=999; \ - useradd -r -g cassandra --uid=999 cassandra - -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ -# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc2 \ -# "free" is used by cassandra-env.sh - procps \ -# "cqlsh" needs a python interpreter - python \ -# "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) - iproute2 \ -# Cassandra will automatically use numactl if available -# https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 -# https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a - numactl \ - ; \ - rm -rf /var/lib/apt/lists/*; \ -# https://issues.apache.org/jira/browse/CASSANDRA-15767 ("bin/cassandra" only looks for "libjemalloc.so" or "libjemalloc.so.1" which doesn't match our "libjemalloc.so.2") - libjemalloc="$(readlink -e /usr/lib/*/libjemalloc.so.2)"; \ - ln -sT "$libjemalloc" /usr/local/lib/libjemalloc.so; \ - ldconfig - -# grab gosu for easy step-down from root -# https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.12 -RUN set -eux; \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ - rm -rf /var/lib/apt/lists/*; \ - dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ - wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ - wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ - 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 CASSANDRA_HOME /opt/cassandra -ENV CASSANDRA_CONF /etc/cassandra -ENV PATH $CASSANDRA_HOME/bin:$PATH - -# https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys -# $ docker run --rm buildpack-deps:buster-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' -ENV GPG_KEYS \ -# Eric Evans - CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ -# Eric Evans - C4965EE9E3015D192CCCF2B6F758CE318D77295D \ -# Sylvain Lebresne (pcmanus) - 5AED1BF378E9A19DADE1BCB34BD736A82B5C1B00 \ -# T Jake Luciani - 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ -# Michael Shuler - A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ -# Michael Semb Wever - A4C465FEA0C552561A392A61E91335D77E3E87CB \ -# Alex Petrov - 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C \ -# Jordan West - C4009872C59B49561310D966D0062876AF30F054 \ -# Brandon Williams - B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ -# Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) - 3E9C876907A560ACA00964F363E9BAD215BBF5F0 - -ENV CASSANDRA_VERSION 2.1.22 -ENV CASSANDRA_SHA512 68c13950f02bc0d03cc70a45ae9ea3786f07248d7e5d4385fe8776c4e5d3b041addd0f9594b2d06e7fe25a3454eac20ed531bdc380e6122b7149d2c8ac5d866b - -RUN set -eux; \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ - rm -rf /var/lib/apt/lists/*; \ - \ - ddist() { \ - local f="$1"; shift; \ - local distFile="$1"; shift; \ - local success=; \ - local distUrl=; \ - for distUrl in \ -# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 - 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ -# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ - https://www-us.apache.org/dist/ \ - https://www.apache.org/dist/ \ - https://archive.apache.org/dist/ \ - ; do \ - if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ - success=1; \ - break; \ - fi; \ - done; \ - [ -n "$success" ]; \ - }; \ - \ - ddist 'cassandra-bin.tgz' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz"; \ - echo "$CASSANDRA_SHA512 *cassandra-bin.tgz" | sha512sum --check --strict -; \ - \ - ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ - for key in $GPG_KEYS; do \ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ - done; \ - gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ - rm -rf "$GNUPGHOME"; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - \ - mkdir -p "$CASSANDRA_HOME"; \ - tar --extract --file cassandra-bin.tgz --directory "$CASSANDRA_HOME" --strip-components 1; \ - rm cassandra-bin.tgz*; \ - \ - [ ! -e "$CASSANDRA_CONF" ]; \ - mv "$CASSANDRA_HOME/conf" "$CASSANDRA_CONF"; \ - ln -sT "$CASSANDRA_CONF" "$CASSANDRA_HOME/conf"; \ - \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - ppc64el) \ -# https://issues.apache.org/jira/browse/CASSANDRA-13345 -# "The stack size specified is too small, Specify at least 328k" - if grep -q -- '^-Xss' "$CASSANDRA_CONF/jvm.options"; then \ -# 3.11+ (jvm.options) - grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ - sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ - grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ - elif grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; then \ -# 3.0 (cassandra-env.sh) - sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ - grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ - fi; \ - ;; \ - esac; \ - \ - mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ - chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ - chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ - chmod -R a+rwX "$CASSANDRA_CONF"; \ - ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ - ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ - \ -# smoke test - cassandra -v - -VOLUME /var/lib/cassandra - -COPY docker-entrypoint.sh /usr/local/bin/ -RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat -ENTRYPOINT ["docker-entrypoint.sh"] - -# 7000: intra-node communication -# 7001: TLS intra-node communication -# 7199: JMX -# 9042: CQL -# 9160: thrift service -EXPOSE 7000 7001 7199 9042 9160 -CMD ["cassandra", "-f"] diff --git a/2.1/docker-entrypoint.sh b/2.1/docker-entrypoint.sh deleted file mode 100755 index 6549f83..0000000 --- a/2.1/docker-entrypoint.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -set -e - -# first arg is `-f` or `--some-option` -# or there are no args -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - set -- cassandra -f "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - find "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra \ - \! -user cassandra -exec chown cassandra '{}' + - exec gosu cassandra "$BASH_SOURCE" "$@" -fi - -_ip_address() { - # scrape the first non-localhost IP address of the container - # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first - ip address | awk ' - $1 != "inet" { next } # only lines with ip addresses - $NF == "lo" { next } # skip loopback devices - $2 ~ /^127[.]/ { next } # skip loopback addresses - $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses - { - gsub(/\/.+$/, "", $2) - print $2 - exit - } - ' -} - -# "sed -i", but without "mv" (which doesn't work on a bind-mounted file, for example) -_sed-in-place() { - local filename="$1"; shift - local tempFile - tempFile="$(mktemp)" - sed "$@" "$filename" > "$tempFile" - cat "$tempFile" > "$filename" - rm "$tempFile" -} - -if [ "$1" = 'cassandra' ]; then - : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} - - : ${CASSANDRA_LISTEN_ADDRESS='auto'} - if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then - CASSANDRA_LISTEN_ADDRESS="$(_ip_address)" - fi - - : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} - - if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then - CASSANDRA_BROADCAST_ADDRESS="$(_ip_address)" - fi - : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} - - if [ -n "${CASSANDRA_NAME:+1}" ]; then - : ${CASSANDRA_SEEDS:="cassandra"} - fi - : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - - _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ - -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' - - for yaml in \ - broadcast_address \ - broadcast_rpc_address \ - cluster_name \ - endpoint_snitch \ - listen_address \ - num_tokens \ - rpc_address \ - start_rpc \ - ; do - var="CASSANDRA_${yaml^^}" - val="${!var}" - if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ - -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' - fi - done - - for rackdc in dc rack; do - var="CASSANDRA_${rackdc^^}" - val="${!var}" - if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONF/cassandra-rackdc.properties" \ - -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' - fi - done -fi - -exec "$@" diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 1ba5ce4..14ffa60 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -92,12 +92,6 @@ for version; do arches="$(sed -r -e 's/ arm64v8 / /g' <<<" $arches ")" fi - if [ "$version" = '2.1' ]; then - # 2.1 fails on arm32v7 - # "A fatal error has been detected by the Java Runtime Environment: Internal Error (os_linux_zero.cpp:254), pid=1, tid=0xf7531460" - arches="$(sed -r -e 's/ arm32v[0-9]+ / /g' <<<" $arches ")" - fi - # s390x is not actually supported # https://github.com/docker-library/cassandra/pull/116#issuecomment-326654542 # https://github.com/docker-library/cassandra/issues/193 diff --git a/versions.json b/versions.json index 855a036..60c98ce 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,4 @@ { - "2.1": { - "java": "8", - "sha512": "68c13950f02bc0d03cc70a45ae9ea3786f07248d7e5d4385fe8776c4e5d3b041addd0f9594b2d06e7fe25a3454eac20ed531bdc380e6122b7149d2c8ac5d866b", - "version": "2.1.22" - }, "2.2": { "java": "8", "sha512": "174688cb51ea7f683ace0de158a3ab080b2799c2001c501ede68253d2990d03737396cc7743eee6d65523bbd21f6b10948279691de1a313dc2f4d0d26cf5315b", diff --git a/versions.sh b/versions.sh index 4fe345b..accc9a1 100755 --- a/versions.sh +++ b/versions.sh @@ -3,7 +3,6 @@ set -Eeuo pipefail defaultJavaVersion='11' declare -A javaVersions=( - [2.1]='8' [2.2]='8' [3.0]='8' [3.11]='8' From 9e67d08a5990ba44b8464d7773f1bbbfaae834e4 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 7 Sep 2021 13:12:48 -0700 Subject: [PATCH 135/223] Switch to Eclipse Temurin (and update PGP keys list) --- 2.2/Dockerfile | 8 +++++--- 3.0/Dockerfile | 8 +++++--- 3.11/Dockerfile | 8 +++++--- 4.0/Dockerfile | 8 +++++--- Dockerfile.template | 8 +++++--- 5 files changed, 25 insertions(+), 15 deletions(-) diff --git a/2.2/Dockerfile b/2.2/Dockerfile index 934d6fa..42c0f1a 100644 --- a/2.2/Dockerfile +++ b/2.2/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM adoptopenjdk:8-jre-hotspot-focal +FROM eclipse-temurin:8-jre-focal # explicitly set user/group IDs RUN set -eux; \ @@ -61,7 +61,7 @@ ENV CASSANDRA_CONF /etc/cassandra ENV PATH $CASSANDRA_HOME/bin:$PATH # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys -# $ docker run --rm buildpack-deps:buster-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' +# $ docker run --rm buildpack-deps:bullseye-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' ENV GPG_KEYS \ # Eric Evans CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ @@ -82,7 +82,9 @@ ENV GPG_KEYS \ # Brandon Williams B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) - 3E9C876907A560ACA00964F363E9BAD215BBF5F0 + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ +# Sam Tunnicliffe (CODE SIGNING KEY) + F8B7FD00E05C932991A2CD6150EE103D162C5A55 ENV CASSANDRA_VERSION 2.2.19 ENV CASSANDRA_SHA512 174688cb51ea7f683ace0de158a3ab080b2799c2001c501ede68253d2990d03737396cc7743eee6d65523bbd21f6b10948279691de1a313dc2f4d0d26cf5315b diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 5e9d31f..4964e24 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM adoptopenjdk:8-jre-hotspot-focal +FROM eclipse-temurin:8-jre-focal # explicitly set user/group IDs RUN set -eux; \ @@ -61,7 +61,7 @@ ENV CASSANDRA_CONF /etc/cassandra ENV PATH $CASSANDRA_HOME/bin:$PATH # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys -# $ docker run --rm buildpack-deps:buster-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' +# $ docker run --rm buildpack-deps:bullseye-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' ENV GPG_KEYS \ # Eric Evans CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ @@ -82,7 +82,9 @@ ENV GPG_KEYS \ # Brandon Williams B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) - 3E9C876907A560ACA00964F363E9BAD215BBF5F0 + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ +# Sam Tunnicliffe (CODE SIGNING KEY) + F8B7FD00E05C932991A2CD6150EE103D162C5A55 ENV CASSANDRA_VERSION 3.0.25 ENV CASSANDRA_SHA512 a425485a995a8dba998303e368af3cabc322a824f9e42c9e30c4890a0fe186a6bfa19d18b00f2e0336c3c100c6461f191a3e78e201cc91e99f8b80d8df803fdc diff --git a/3.11/Dockerfile b/3.11/Dockerfile index eddfbf9..368e959 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM adoptopenjdk:8-jre-hotspot-focal +FROM eclipse-temurin:8-jre-focal # explicitly set user/group IDs RUN set -eux; \ @@ -61,7 +61,7 @@ ENV CASSANDRA_CONF /etc/cassandra ENV PATH $CASSANDRA_HOME/bin:$PATH # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys -# $ docker run --rm buildpack-deps:buster-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' +# $ docker run --rm buildpack-deps:bullseye-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' ENV GPG_KEYS \ # Eric Evans CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ @@ -82,7 +82,9 @@ ENV GPG_KEYS \ # Brandon Williams B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) - 3E9C876907A560ACA00964F363E9BAD215BBF5F0 + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ +# Sam Tunnicliffe (CODE SIGNING KEY) + F8B7FD00E05C932991A2CD6150EE103D162C5A55 ENV CASSANDRA_VERSION 3.11.11 ENV CASSANDRA_SHA512 5a7dc4237c9f43526b63cae62f04d73ec60f28e86ee1dd4bd4aaa55d2063d74fe842e015f7f68512db7deadbe52cab37417341183a716c191035463992e42d37 diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 95273ee..b86c119 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM adoptopenjdk:11-jre-hotspot-focal +FROM eclipse-temurin:11-jre-focal # explicitly set user/group IDs RUN set -eux; \ @@ -61,7 +61,7 @@ ENV CASSANDRA_CONF /etc/cassandra ENV PATH $CASSANDRA_HOME/bin:$PATH # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys -# $ docker run --rm buildpack-deps:buster-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' +# $ docker run --rm buildpack-deps:bullseye-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' ENV GPG_KEYS \ # Eric Evans CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ @@ -82,7 +82,9 @@ ENV GPG_KEYS \ # Brandon Williams B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) - 3E9C876907A560ACA00964F363E9BAD215BBF5F0 + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ +# Sam Tunnicliffe (CODE SIGNING KEY) + F8B7FD00E05C932991A2CD6150EE103D162C5A55 ENV CASSANDRA_VERSION 4.0.0 ENV CASSANDRA_SHA512 94e923963531b97dbfcf90eb95e423abd9990fae02d1c9a90bf2d76ceb6cd9e422db628b9ec3a45994b3654f1f562f5df84718064722004ae8ba5b5abb11d0b6 diff --git a/Dockerfile.template b/Dockerfile.template index 33a639d..1701a7f 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,4 +1,4 @@ -FROM adoptopenjdk:{{ .java }}-jre-hotspot-focal +FROM eclipse-temurin:{{ .java }}-jre-focal # explicitly set user/group IDs RUN set -eux; \ @@ -63,7 +63,7 @@ ENV CASSANDRA_CONF /etc/cassandra ENV PATH $CASSANDRA_HOME/bin:$PATH # https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys -# $ docker run --rm buildpack-deps:buster-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' +# $ docker run --rm buildpack-deps:bullseye-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' ENV GPG_KEYS \ # Eric Evans CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ @@ -84,7 +84,9 @@ ENV GPG_KEYS \ # Brandon Williams B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) - 3E9C876907A560ACA00964F363E9BAD215BBF5F0 + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ +# Sam Tunnicliffe (CODE SIGNING KEY) + F8B7FD00E05C932991A2CD6150EE103D162C5A55 ENV CASSANDRA_VERSION {{ .version }} ENV CASSANDRA_SHA512 {{ .sha512 }} From 9ad4840f08a292dfb22e17b0410d6960b6b5e5d2 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 7 Sep 2021 13:26:25 -0700 Subject: [PATCH 136/223] Remove 2.2 (EOL) See https://cassandra.apache.org/_/download.html --- 2.2/Dockerfile | 182 ---------------------------------- 2.2/docker-entrypoint.sh | 94 ------------------ generate-stackbrew-library.sh | 8 -- versions.json | 5 - versions.sh | 1 - 5 files changed, 290 deletions(-) delete mode 100644 2.2/Dockerfile delete mode 100755 2.2/docker-entrypoint.sh diff --git a/2.2/Dockerfile b/2.2/Dockerfile deleted file mode 100644 index 42c0f1a..0000000 --- a/2.2/Dockerfile +++ /dev/null @@ -1,182 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM eclipse-temurin:8-jre-focal - -# explicitly set user/group IDs -RUN set -eux; \ - groupadd -r cassandra --gid=999; \ - useradd -r -g cassandra --uid=999 cassandra - -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ -# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" - libjemalloc2 \ -# "free" is used by cassandra-env.sh - procps \ -# "cqlsh" needs a python interpreter - python \ -# "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) - iproute2 \ -# Cassandra will automatically use numactl if available -# https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 -# https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a - numactl \ - ; \ - rm -rf /var/lib/apt/lists/*; \ -# https://issues.apache.org/jira/browse/CASSANDRA-15767 ("bin/cassandra" only looks for "libjemalloc.so" or "libjemalloc.so.1" which doesn't match our "libjemalloc.so.2") - libjemalloc="$(readlink -e /usr/lib/*/libjemalloc.so.2)"; \ - ln -sT "$libjemalloc" /usr/local/lib/libjemalloc.so; \ - ldconfig - -# grab gosu for easy step-down from root -# https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.12 -RUN set -eux; \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ - rm -rf /var/lib/apt/lists/*; \ - dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ - wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ - wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ - 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 CASSANDRA_HOME /opt/cassandra -ENV CASSANDRA_CONF /etc/cassandra -ENV PATH $CASSANDRA_HOME/bin:$PATH - -# https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys -# $ docker run --rm buildpack-deps:bullseye-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' -ENV GPG_KEYS \ -# Eric Evans - CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ -# Eric Evans - C4965EE9E3015D192CCCF2B6F758CE318D77295D \ -# Sylvain Lebresne (pcmanus) - 5AED1BF378E9A19DADE1BCB34BD736A82B5C1B00 \ -# T Jake Luciani - 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ -# Michael Shuler - A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ -# Michael Semb Wever - A4C465FEA0C552561A392A61E91335D77E3E87CB \ -# Alex Petrov - 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C \ -# Jordan West - C4009872C59B49561310D966D0062876AF30F054 \ -# Brandon Williams - B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ -# Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) - 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ -# Sam Tunnicliffe (CODE SIGNING KEY) - F8B7FD00E05C932991A2CD6150EE103D162C5A55 - -ENV CASSANDRA_VERSION 2.2.19 -ENV CASSANDRA_SHA512 174688cb51ea7f683ace0de158a3ab080b2799c2001c501ede68253d2990d03737396cc7743eee6d65523bbd21f6b10948279691de1a313dc2f4d0d26cf5315b - -RUN set -eux; \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ - rm -rf /var/lib/apt/lists/*; \ - \ - ddist() { \ - local f="$1"; shift; \ - local distFile="$1"; shift; \ - local success=; \ - local distUrl=; \ - for distUrl in \ -# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 - 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ -# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ - https://www-us.apache.org/dist/ \ - https://www.apache.org/dist/ \ - https://archive.apache.org/dist/ \ - ; do \ - if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ - success=1; \ - break; \ - fi; \ - done; \ - [ -n "$success" ]; \ - }; \ - \ - ddist 'cassandra-bin.tgz' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz"; \ - echo "$CASSANDRA_SHA512 *cassandra-bin.tgz" | sha512sum --check --strict -; \ - \ - ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ - export GNUPGHOME="$(mktemp -d)"; \ - for key in $GPG_KEYS; do \ - gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ - done; \ - gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ - rm -rf "$GNUPGHOME"; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - \ - mkdir -p "$CASSANDRA_HOME"; \ - tar --extract --file cassandra-bin.tgz --directory "$CASSANDRA_HOME" --strip-components 1; \ - rm cassandra-bin.tgz*; \ - \ - [ ! -e "$CASSANDRA_CONF" ]; \ - mv "$CASSANDRA_HOME/conf" "$CASSANDRA_CONF"; \ - ln -sT "$CASSANDRA_CONF" "$CASSANDRA_HOME/conf"; \ - \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "$dpkgArch" in \ - ppc64el) \ -# https://issues.apache.org/jira/browse/CASSANDRA-13345 -# "The stack size specified is too small, Specify at least 328k" - if grep -q -- '^-Xss' "$CASSANDRA_CONF/jvm.options"; then \ -# 3.11+ (jvm.options) - grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ - sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ - grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ - elif grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; then \ -# 3.0 (cassandra-env.sh) - sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ - grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ - fi; \ - ;; \ - esac; \ - \ - mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ - chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ - chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ - chmod -R a+rwX "$CASSANDRA_CONF"; \ - ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ - ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ - \ -# smoke test - cassandra -v - -VOLUME /var/lib/cassandra - -COPY docker-entrypoint.sh /usr/local/bin/ -RUN ln -s usr/local/bin/docker-entrypoint.sh /docker-entrypoint.sh # backwards compat -ENTRYPOINT ["docker-entrypoint.sh"] - -# 7000: intra-node communication -# 7001: TLS intra-node communication -# 7199: JMX -# 9042: CQL -# 9160: thrift service -EXPOSE 7000 7001 7199 9042 9160 -CMD ["cassandra", "-f"] diff --git a/2.2/docker-entrypoint.sh b/2.2/docker-entrypoint.sh deleted file mode 100755 index 6549f83..0000000 --- a/2.2/docker-entrypoint.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash -set -e - -# first arg is `-f` or `--some-option` -# or there are no args -if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then - set -- cassandra -f "$@" -fi - -# allow the container to be started with `--user` -if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then - find "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra \ - \! -user cassandra -exec chown cassandra '{}' + - exec gosu cassandra "$BASH_SOURCE" "$@" -fi - -_ip_address() { - # scrape the first non-localhost IP address of the container - # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first - ip address | awk ' - $1 != "inet" { next } # only lines with ip addresses - $NF == "lo" { next } # skip loopback devices - $2 ~ /^127[.]/ { next } # skip loopback addresses - $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses - { - gsub(/\/.+$/, "", $2) - print $2 - exit - } - ' -} - -# "sed -i", but without "mv" (which doesn't work on a bind-mounted file, for example) -_sed-in-place() { - local filename="$1"; shift - local tempFile - tempFile="$(mktemp)" - sed "$@" "$filename" > "$tempFile" - cat "$tempFile" > "$filename" - rm "$tempFile" -} - -if [ "$1" = 'cassandra' ]; then - : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} - - : ${CASSANDRA_LISTEN_ADDRESS='auto'} - if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then - CASSANDRA_LISTEN_ADDRESS="$(_ip_address)" - fi - - : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} - - if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then - CASSANDRA_BROADCAST_ADDRESS="$(_ip_address)" - fi - : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} - - if [ -n "${CASSANDRA_NAME:+1}" ]; then - : ${CASSANDRA_SEEDS:="cassandra"} - fi - : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} - - _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ - -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' - - for yaml in \ - broadcast_address \ - broadcast_rpc_address \ - cluster_name \ - endpoint_snitch \ - listen_address \ - num_tokens \ - rpc_address \ - start_rpc \ - ; do - var="CASSANDRA_${yaml^^}" - val="${!var}" - if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ - -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' - fi - done - - for rackdc in dc rack; do - var="CASSANDRA_${rackdc^^}" - val="${!var}" - if [ "$val" ]; then - _sed-in-place "$CASSANDRA_CONF/cassandra-rackdc.properties" \ - -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' - fi - done -fi - -exec "$@" diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 14ffa60..966a23e 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -2,7 +2,6 @@ set -eu declare -A aliases=( - [2.2]='2' [3.11]='3' [4.0]='4 latest' ) @@ -85,13 +84,6 @@ for version; do parent="$(awk 'toupper($1) == "FROM" { print $2 }' "$version/Dockerfile")" arches="${parentRepoToArches[$parent]}" - if [ "$version" = '2.2' ]; then - # https://github.com/docker-library/cassandra/pull/116#issuecomment-326650640 - # Exception (java.lang.RuntimeException) encountered during startup: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native - # java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native - arches="$(sed -r -e 's/ arm64v8 / /g' <<<" $arches ")" - fi - # s390x is not actually supported # https://github.com/docker-library/cassandra/pull/116#issuecomment-326654542 # https://github.com/docker-library/cassandra/issues/193 diff --git a/versions.json b/versions.json index 60c98ce..fd3a865 100644 --- a/versions.json +++ b/versions.json @@ -1,9 +1,4 @@ { - "2.2": { - "java": "8", - "sha512": "174688cb51ea7f683ace0de158a3ab080b2799c2001c501ede68253d2990d03737396cc7743eee6d65523bbd21f6b10948279691de1a313dc2f4d0d26cf5315b", - "version": "2.2.19" - }, "3.0": { "java": "8", "sha512": "a425485a995a8dba998303e368af3cabc322a824f9e42c9e30c4890a0fe186a6bfa19d18b00f2e0336c3c100c6461f191a3e78e201cc91e99f8b80d8df803fdc", diff --git a/versions.sh b/versions.sh index accc9a1..1e4d2aa 100755 --- a/versions.sh +++ b/versions.sh @@ -3,7 +3,6 @@ set -Eeuo pipefail defaultJavaVersion='11' declare -A javaVersions=( - [2.2]='8' [3.0]='8' [3.11]='8' ) From f58183960ff693e4ec0c28f9f85453d69f646243 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 7 Sep 2021 13:27:05 -0700 Subject: [PATCH 137/223] Update 4.0 to 4.0.1 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index b86c119..1984355 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 4.0.0 -ENV CASSANDRA_SHA512 94e923963531b97dbfcf90eb95e423abd9990fae02d1c9a90bf2d76ceb6cd9e422db628b9ec3a45994b3654f1f562f5df84718064722004ae8ba5b5abb11d0b6 +ENV CASSANDRA_VERSION 4.0.1 +ENV CASSANDRA_SHA512 2890c054666afa93fe2978c46da5db15ed7d11d60f4890574dc642bd81f7b3af40b41d3e5b8245e6c1453a165eddebeb28bcf3fef1a2b2fc6fb3b82058d7ceb0 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index fd3a865..6723510 100644 --- a/versions.json +++ b/versions.json @@ -11,7 +11,7 @@ }, "4.0": { "java": "11", - "sha512": "94e923963531b97dbfcf90eb95e423abd9990fae02d1c9a90bf2d76ceb6cd9e422db628b9ec3a45994b3654f1f562f5df84718064722004ae8ba5b5abb11d0b6", - "version": "4.0.0" + "sha512": "2890c054666afa93fe2978c46da5db15ed7d11d60f4890574dc642bd81f7b3af40b41d3e5b8245e6c1453a165eddebeb28bcf3fef1a2b2fc6fb3b82058d7ceb0", + "version": "4.0.1" } } From 4514513f79f99f5c57184b57a42171ef3e5f7984 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 10 Feb 2022 19:24:13 -0800 Subject: [PATCH 138/223] Update 3.0 to 3.0.26 --- 3.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 4964e24..6a4cbee 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 3.0.25 -ENV CASSANDRA_SHA512 a425485a995a8dba998303e368af3cabc322a824f9e42c9e30c4890a0fe186a6bfa19d18b00f2e0336c3c100c6461f191a3e78e201cc91e99f8b80d8df803fdc +ENV CASSANDRA_VERSION 3.0.26 +ENV CASSANDRA_SHA512 1f18094d0191d722371942d6046dcd0b70342c995800c277c822d81a2584c3b8d3f38d47f831b19d3ccf17b079a24540672998ba1b546d67594ff62618323c54 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 6723510..74ec2b2 100644 --- a/versions.json +++ b/versions.json @@ -1,8 +1,8 @@ { "3.0": { "java": "8", - "sha512": "a425485a995a8dba998303e368af3cabc322a824f9e42c9e30c4890a0fe186a6bfa19d18b00f2e0336c3c100c6461f191a3e78e201cc91e99f8b80d8df803fdc", - "version": "3.0.25" + "sha512": "1f18094d0191d722371942d6046dcd0b70342c995800c277c822d81a2584c3b8d3f38d47f831b19d3ccf17b079a24540672998ba1b546d67594ff62618323c54", + "version": "3.0.26" }, "3.11": { "java": "8", From 70ecd6c8d9ef280b967db295e1ee3463b7a08ed2 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 10 Feb 2022 19:27:00 -0800 Subject: [PATCH 139/223] Update 3.11 to 3.11.12 --- 3.11/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 368e959..e94411e 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 3.11.11 -ENV CASSANDRA_SHA512 5a7dc4237c9f43526b63cae62f04d73ec60f28e86ee1dd4bd4aaa55d2063d74fe842e015f7f68512db7deadbe52cab37417341183a716c191035463992e42d37 +ENV CASSANDRA_VERSION 3.11.12 +ENV CASSANDRA_SHA512 788446e281353bd1bebab983702643a4a8a5ac39ae69d6e17c257793de7a9105884c2cd35a40873ad5a091b36cd916934ef2d51d1e347b729d5068fc54a54f01 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 74ec2b2..acd8b80 100644 --- a/versions.json +++ b/versions.json @@ -6,8 +6,8 @@ }, "3.11": { "java": "8", - "sha512": "5a7dc4237c9f43526b63cae62f04d73ec60f28e86ee1dd4bd4aaa55d2063d74fe842e015f7f68512db7deadbe52cab37417341183a716c191035463992e42d37", - "version": "3.11.11" + "sha512": "788446e281353bd1bebab983702643a4a8a5ac39ae69d6e17c257793de7a9105884c2cd35a40873ad5a091b36cd916934ef2d51d1e347b729d5068fc54a54f01", + "version": "3.11.12" }, "4.0": { "java": "11", From d9ed9b41dd291528f942c5c4a7a75df0c37a6e8c Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 10 Feb 2022 19:28:08 -0800 Subject: [PATCH 140/223] Update 4.0 to 4.0.2 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 1984355..218c2b8 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 4.0.1 -ENV CASSANDRA_SHA512 2890c054666afa93fe2978c46da5db15ed7d11d60f4890574dc642bd81f7b3af40b41d3e5b8245e6c1453a165eddebeb28bcf3fef1a2b2fc6fb3b82058d7ceb0 +ENV CASSANDRA_VERSION 4.0.2 +ENV CASSANDRA_SHA512 4653ee99acc6e386e065bb58ef4772420faafcd56b99ff57072dbd969a17abfe2a515cf26fe3de08818f69412159999de5f3b6ef097408599b0304e2d915dd9f RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index acd8b80..9472a8f 100644 --- a/versions.json +++ b/versions.json @@ -11,7 +11,7 @@ }, "4.0": { "java": "11", - "sha512": "2890c054666afa93fe2978c46da5db15ed7d11d60f4890574dc642bd81f7b3af40b41d3e5b8245e6c1453a165eddebeb28bcf3fef1a2b2fc6fb3b82058d7ceb0", - "version": "4.0.1" + "sha512": "4653ee99acc6e386e065bb58ef4772420faafcd56b99ff57072dbd969a17abfe2a515cf26fe3de08818f69412159999de5f3b6ef097408599b0304e2d915dd9f", + "version": "4.0.2" } } From ac4975fcd60b47291ca4772d8cce8047f10674b4 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 16 Feb 2022 19:24:21 -0800 Subject: [PATCH 141/223] Update 4.0 to 4.0.3 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 218c2b8..63ce121 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 4.0.2 -ENV CASSANDRA_SHA512 4653ee99acc6e386e065bb58ef4772420faafcd56b99ff57072dbd969a17abfe2a515cf26fe3de08818f69412159999de5f3b6ef097408599b0304e2d915dd9f +ENV CASSANDRA_VERSION 4.0.3 +ENV CASSANDRA_SHA512 b328a6bed9bf2d92f1e44a540bf1d800e26163257ca8e69d6f43ca792aeefe5bacf61b6e5bf2cf7233e34a168ab19de96a52fb3fe82304b7749fde2d7baa81d9 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 9472a8f..ff34997 100644 --- a/versions.json +++ b/versions.json @@ -11,7 +11,7 @@ }, "4.0": { "java": "11", - "sha512": "4653ee99acc6e386e065bb58ef4772420faafcd56b99ff57072dbd969a17abfe2a515cf26fe3de08818f69412159999de5f3b6ef097408599b0304e2d915dd9f", - "version": "4.0.2" + "sha512": "b328a6bed9bf2d92f1e44a540bf1d800e26163257ca8e69d6f43ca792aeefe5bacf61b6e5bf2cf7233e34a168ab19de96a52fb3fe82304b7749fde2d7baa81d9", + "version": "4.0.3" } } From d6898545a7629b1a7ee7e719379e26fab9bc29de Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 13 May 2022 19:24:14 -0700 Subject: [PATCH 142/223] Update 3.0 to 3.0.27 --- 3.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 6a4cbee..faa3646 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 3.0.26 -ENV CASSANDRA_SHA512 1f18094d0191d722371942d6046dcd0b70342c995800c277c822d81a2584c3b8d3f38d47f831b19d3ccf17b079a24540672998ba1b546d67594ff62618323c54 +ENV CASSANDRA_VERSION 3.0.27 +ENV CASSANDRA_SHA512 3848241517197b815e219af5c3cabdf6303d7bbabf9e21afdbd979c7e07ece8c49d8cdefb558013a451c1ef386a35440c647147731521d2ec6aa1887b37cacf1 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index ff34997..56037b6 100644 --- a/versions.json +++ b/versions.json @@ -1,8 +1,8 @@ { "3.0": { "java": "8", - "sha512": "1f18094d0191d722371942d6046dcd0b70342c995800c277c822d81a2584c3b8d3f38d47f831b19d3ccf17b079a24540672998ba1b546d67594ff62618323c54", - "version": "3.0.26" + "sha512": "3848241517197b815e219af5c3cabdf6303d7bbabf9e21afdbd979c7e07ece8c49d8cdefb558013a451c1ef386a35440c647147731521d2ec6aa1887b37cacf1", + "version": "3.0.27" }, "3.11": { "java": "8", From dd116c4542c20c0cb34df6db706230cb7872c51d Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 13 May 2022 19:26:19 -0700 Subject: [PATCH 143/223] Update 3.11 to 3.11.13 --- 3.11/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index e94411e..2037f39 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 3.11.12 -ENV CASSANDRA_SHA512 788446e281353bd1bebab983702643a4a8a5ac39ae69d6e17c257793de7a9105884c2cd35a40873ad5a091b36cd916934ef2d51d1e347b729d5068fc54a54f01 +ENV CASSANDRA_VERSION 3.11.13 +ENV CASSANDRA_SHA512 d356a27a355797f490a36ef14f6e0062c0f77e180ca29debbaa8a92b073e8a922010ad91b911c2a075117d0399d712bda2ac90724430884dd1e3297b6c5e064d RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 56037b6..252b35e 100644 --- a/versions.json +++ b/versions.json @@ -6,8 +6,8 @@ }, "3.11": { "java": "8", - "sha512": "788446e281353bd1bebab983702643a4a8a5ac39ae69d6e17c257793de7a9105884c2cd35a40873ad5a091b36cd916934ef2d51d1e347b729d5068fc54a54f01", - "version": "3.11.12" + "sha512": "d356a27a355797f490a36ef14f6e0062c0f77e180ca29debbaa8a92b073e8a922010ad91b911c2a075117d0399d712bda2ac90724430884dd1e3297b6c5e064d", + "version": "3.11.13" }, "4.0": { "java": "11", From e78718f9e87bc48ec55d367b91f1b4ab4534dbf2 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 13 May 2022 19:27:28 -0700 Subject: [PATCH 144/223] Update 4.0 to 4.0.4 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 63ce121..855791d 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 4.0.3 -ENV CASSANDRA_SHA512 b328a6bed9bf2d92f1e44a540bf1d800e26163257ca8e69d6f43ca792aeefe5bacf61b6e5bf2cf7233e34a168ab19de96a52fb3fe82304b7749fde2d7baa81d9 +ENV CASSANDRA_VERSION 4.0.4 +ENV CASSANDRA_SHA512 67a7830d32851bd8b7b02731a331a7640f5d7ab2a4d0b7caf1dee6e301c7508ce5209bd60faf42db915462d0796df833c021a4a964efce55561df57e91c27432 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 252b35e..ed6b0da 100644 --- a/versions.json +++ b/versions.json @@ -11,7 +11,7 @@ }, "4.0": { "java": "11", - "sha512": "b328a6bed9bf2d92f1e44a540bf1d800e26163257ca8e69d6f43ca792aeefe5bacf61b6e5bf2cf7233e34a168ab19de96a52fb3fe82304b7749fde2d7baa81d9", - "version": "4.0.3" + "sha512": "67a7830d32851bd8b7b02731a331a7640f5d7ab2a4d0b7caf1dee6e301c7508ce5209bd60faf42db915462d0796df833c021a4a964efce55561df57e91c27432", + "version": "4.0.4" } } From cdd3cd5b3b9e8863fbcdd5ac1d8646c52bc74f10 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 17 May 2022 11:57:37 -0700 Subject: [PATCH 145/223] Update gosu to 1.14 --- 3.0/Dockerfile | 2 +- 3.11/Dockerfile | 2 +- 4.0/Dockerfile | 2 +- Dockerfile.template | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index faa3646..3ed8f70 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -35,7 +35,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.12 +ENV GOSU_VERSION 1.14 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 2037f39..0e74c03 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -35,7 +35,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.12 +ENV GOSU_VERSION 1.14 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 855791d..88d7949 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -35,7 +35,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.12 +ENV GOSU_VERSION 1.14 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/Dockerfile.template b/Dockerfile.template index 1701a7f..aa6b739 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -37,7 +37,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.12 +ENV GOSU_VERSION 1.14 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ From dee264d35d3efd9aa8368742605d2e48979ec1b1 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 31 May 2022 15:26:16 -0700 Subject: [PATCH 146/223] Remove arch exclusions -- 4.0 is now working on s390x! Closes #193 --- generate-stackbrew-library.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 966a23e..7234a48 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -84,17 +84,6 @@ for version; do parent="$(awk 'toupper($1) == "FROM" { print $2 }' "$version/Dockerfile")" arches="${parentRepoToArches[$parent]}" - # s390x is not actually supported - # https://github.com/docker-library/cassandra/pull/116#issuecomment-326654542 - # https://github.com/docker-library/cassandra/issues/193 - # https://issues.apache.org/jira/browse/CASSANDRA-11054 - arches="$(sed -r -e 's/ s390x / /g' <<<" $arches ")" - - # riscv64 doesn't have a proper Java port yet - arches="$(sed -r -e 's/ riscv64 / /g' <<<" $arches ")" - - arches="$(xargs -n1 <<<"$arches" | sort)" - commit="$(dirCommit "$version")" echo From 1a9d5f3ac97204f71bba86259aa56815f8a7eee7 Mon Sep 17 00:00:00 2001 From: Mathieu Ferraton Date: Fri, 3 Jun 2022 18:03:33 +0200 Subject: [PATCH 147/223] update 4.0 Dockerfile to add -Xss512k to JVM_OPTS for ppc64le --- 3.0/Dockerfile | 13 +++---------- 3.11/Dockerfile | 13 +++---------- 4.0/Dockerfile | 13 +++---------- Dockerfile.template | 28 +++++++++++++++++----------- 4 files changed, 26 insertions(+), 41 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 3ed8f70..7a31570 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -144,16 +144,9 @@ RUN set -eux; \ ppc64el) \ # https://issues.apache.org/jira/browse/CASSANDRA-13345 # "The stack size specified is too small, Specify at least 328k" - if grep -q -- '^-Xss' "$CASSANDRA_CONF/jvm.options"; then \ -# 3.11+ (jvm.options) - grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ - sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ - grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ - elif grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; then \ -# 3.0 (cassandra-env.sh) - sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ - grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ - fi; \ + grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; \ + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ ;; \ esac; \ \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 0e74c03..954233b 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -144,16 +144,9 @@ RUN set -eux; \ ppc64el) \ # https://issues.apache.org/jira/browse/CASSANDRA-13345 # "The stack size specified is too small, Specify at least 328k" - if grep -q -- '^-Xss' "$CASSANDRA_CONF/jvm.options"; then \ -# 3.11+ (jvm.options) - grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ - sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ - grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ - elif grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; then \ -# 3.0 (cassandra-env.sh) - sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ - grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ - fi; \ + grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ ;; \ esac; \ \ diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 88d7949..1a5197f 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -144,16 +144,9 @@ RUN set -eux; \ ppc64el) \ # https://issues.apache.org/jira/browse/CASSANDRA-13345 # "The stack size specified is too small, Specify at least 328k" - if grep -q -- '^-Xss' "$CASSANDRA_CONF/jvm.options"; then \ -# 3.11+ (jvm.options) - grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ - sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ - grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ - elif grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; then \ -# 3.0 (cassandra-env.sh) - sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ - grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ - fi; \ + grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm-server.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm-server.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm-server.options"; \ ;; \ esac; \ \ diff --git a/Dockerfile.template b/Dockerfile.template index aa6b739..a8ac488 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,3 +1,6 @@ +{{ + def major: env.version | split(".")[0] | tonumber +-}} FROM eclipse-temurin:{{ .java }}-jre-focal # explicitly set user/group IDs @@ -16,7 +19,7 @@ RUN set -eux; \ {{ # python3 is only supported in 4.0+ # https://issues.apache.org/jira/browse/CASSANDRA-10190 - if env.version | split(".") | .[0] | tonumber < 4 then ( + if major < 4 then ( -}} python \ {{ ) else ( -}} @@ -146,16 +149,19 @@ RUN set -eux; \ ppc64el) \ # https://issues.apache.org/jira/browse/CASSANDRA-13345 # "The stack size specified is too small, Specify at least 328k" - if grep -q -- '^-Xss' "$CASSANDRA_CONF/jvm.options"; then \ -# 3.11+ (jvm.options) - grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ - sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ - grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ - elif grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; then \ -# 3.0 (cassandra-env.sh) - sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ - grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ - fi; \ +{{ if env.version == "3.0" then ( -}} + grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; \ + sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ + grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ +{{ ) elif major == 3 then ( -}} + grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm.options"; \ +{{ ) else ( -}} + grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm-server.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm-server.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm-server.options"; \ +{{ ) end -}} ;; \ esac; \ \ From 9315e4444c9f92b19e3e2d4fbe7c77293f2d33d7 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 3 Jun 2022 16:23:24 -0700 Subject: [PATCH 148/223] Remove errant "-q" --- 3.0/Dockerfile | 2 +- Dockerfile.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 7a31570..42720c7 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -144,7 +144,7 @@ RUN set -eux; \ ppc64el) \ # https://issues.apache.org/jira/browse/CASSANDRA-13345 # "The stack size specified is too small, Specify at least 328k" - grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; \ + grep -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; \ sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ ;; \ diff --git a/Dockerfile.template b/Dockerfile.template index a8ac488..08013fd 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -150,7 +150,7 @@ RUN set -eux; \ # https://issues.apache.org/jira/browse/CASSANDRA-13345 # "The stack size specified is too small, Specify at least 328k" {{ if env.version == "3.0" then ( -}} - grep -q -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; \ + grep -- '-Xss256k' "$CASSANDRA_CONF/cassandra-env.sh"; \ sed -ri 's/-Xss256k/-Xss512k/g' "$CASSANDRA_CONF/cassandra-env.sh"; \ grep -- '-Xss512k' "$CASSANDRA_CONF/cassandra-env.sh"; \ {{ ) elif major == 3 then ( -}} From c3754f02420055b3bf6d9518556b624dd6541356 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 13 Jul 2022 17:11:35 -0700 Subject: [PATCH 149/223] Update jq-template for speed improvements --- apply-templates.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apply-templates.sh b/apply-templates.sh index f1432df..a8eb135 100755 --- a/apply-templates.sh +++ b/apply-templates.sh @@ -7,7 +7,8 @@ jqt='.jq-template.awk' if [ -n "${BASHBREW_SCRIPTS:-}" ]; then jqt="$BASHBREW_SCRIPTS/jq-template.awk" elif [ "$BASH_SOURCE" -nt "$jqt" ]; then - wget -qO "$jqt" 'https://github.com/docker-library/bashbrew/raw/ac3e8e9541cb362a579b05bec41dd40d1df1c6e6/scripts/jq-template.awk' + # https://github.com/docker-library/bashbrew/blob/master/scripts/jq-template.awk + wget -qO "$jqt" 'https://github.com/docker-library/bashbrew/raw/9f6a35772ac863a0241f147c820354e4008edf38/scripts/jq-template.awk' fi if [ "$#" -eq 0 ]; then From b3332696b4a6a4405ebf95a4c4065543ee1a073d Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 18 Jul 2022 13:24:24 -0700 Subject: [PATCH 150/223] Update 4.0 to 4.0.5 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 1a5197f..f27c025 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 4.0.4 -ENV CASSANDRA_SHA512 67a7830d32851bd8b7b02731a331a7640f5d7ab2a4d0b7caf1dee6e301c7508ce5209bd60faf42db915462d0796df833c021a4a964efce55561df57e91c27432 +ENV CASSANDRA_VERSION 4.0.5 +ENV CASSANDRA_SHA512 188e131392ea0e48b46f24b1be297ef6335197f4480c9421328006507e069dce659ce3ce473906398273a5926e331960cbf824362e40cb4c74670cde95458349 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index ed6b0da..16ea851 100644 --- a/versions.json +++ b/versions.json @@ -11,7 +11,7 @@ }, "4.0": { "java": "11", - "sha512": "67a7830d32851bd8b7b02731a331a7640f5d7ab2a4d0b7caf1dee6e301c7508ce5209bd60faf42db915462d0796df833c021a4a964efce55561df57e91c27432", - "version": "4.0.4" + "sha512": "188e131392ea0e48b46f24b1be297ef6335197f4480c9421328006507e069dce659ce3ce473906398273a5926e331960cbf824362e40cb4c74670cde95458349", + "version": "4.0.5" } } From 5aa6b7ed7a342c18da796561252677f17d370616 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 25 Aug 2022 07:24:22 -0700 Subject: [PATCH 151/223] Update 4.0 to 4.0.6 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index f27c025..6a7d495 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 4.0.5 -ENV CASSANDRA_SHA512 188e131392ea0e48b46f24b1be297ef6335197f4480c9421328006507e069dce659ce3ce473906398273a5926e331960cbf824362e40cb4c74670cde95458349 +ENV CASSANDRA_VERSION 4.0.6 +ENV CASSANDRA_SHA512 07c2a2f018c5921bfe0d7afba877a23d0ac5bbda05b9414abc60b4fae761115d0fb650eb226247b66d62c450d7eeadc95b6e270ebf0339d8263222fe5d49b07b RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 16ea851..c98d128 100644 --- a/versions.json +++ b/versions.json @@ -11,7 +11,7 @@ }, "4.0": { "java": "11", - "sha512": "188e131392ea0e48b46f24b1be297ef6335197f4480c9421328006507e069dce659ce3ce473906398273a5926e331960cbf824362e40cb4c74670cde95458349", - "version": "4.0.5" + "sha512": "07c2a2f018c5921bfe0d7afba877a23d0ac5bbda05b9414abc60b4fae761115d0fb650eb226247b66d62c450d7eeadc95b6e270ebf0339d8263222fe5d49b07b", + "version": "4.0.6" } } From e8ee59f9fc070e87595ea3fafe528030bddb8212 Mon Sep 17 00:00:00 2001 From: Erik Merkle Date: Fri, 7 Oct 2022 16:01:41 -0500 Subject: [PATCH 152/223] Add Cassandra 4.1 (#256) --- 4.1/Dockerfile | 174 +++++++++++++++++++++++++++++++++++++++ 4.1/docker-entrypoint.sh | 94 +++++++++++++++++++++ versions.json | 5 ++ 3 files changed, 273 insertions(+) create mode 100644 4.1/Dockerfile create mode 100755 4.1/docker-entrypoint.sh diff --git a/4.1/Dockerfile b/4.1/Dockerfile new file mode 100644 index 0000000..b3b24a1 --- /dev/null +++ b/4.1/Dockerfile @@ -0,0 +1,174 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM eclipse-temurin:11-jre-focal + +# explicitly set user/group IDs +RUN set -eux; \ + groupadd -r cassandra --gid=999; \ + useradd -r -g cassandra --uid=999 cassandra + +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" + libjemalloc2 \ +# "free" is used by cassandra-env.sh + procps \ +# "cqlsh" needs a python interpreter + python3 \ +# "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) + iproute2 \ +# Cassandra will automatically use numactl if available +# https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 +# https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a + numactl \ + ; \ + rm -rf /var/lib/apt/lists/*; \ +# https://issues.apache.org/jira/browse/CASSANDRA-15767 ("bin/cassandra" only looks for "libjemalloc.so" or "libjemalloc.so.1" which doesn't match our "libjemalloc.so.2") + libjemalloc="$(readlink -e /usr/lib/*/libjemalloc.so.2)"; \ + ln -sT "$libjemalloc" /usr/local/lib/libjemalloc.so; \ + ldconfig + +# grab gosu for easy step-down from root +# https://github.com/tianon/gosu/releases +ENV GOSU_VERSION 1.14 +RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + rm -rf /var/lib/apt/lists/*; \ + dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ + 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 CASSANDRA_HOME /opt/cassandra +ENV CASSANDRA_CONF /etc/cassandra +ENV PATH $CASSANDRA_HOME/bin:$PATH + +# https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys +# $ docker run --rm buildpack-deps:bullseye-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' +ENV GPG_KEYS \ +# Eric Evans + CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ +# Eric Evans + C4965EE9E3015D192CCCF2B6F758CE318D77295D \ +# Sylvain Lebresne (pcmanus) + 5AED1BF378E9A19DADE1BCB34BD736A82B5C1B00 \ +# T Jake Luciani + 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ +# Michael Shuler + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ +# Michael Semb Wever + A4C465FEA0C552561A392A61E91335D77E3E87CB \ +# Alex Petrov + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C \ +# Jordan West + C4009872C59B49561310D966D0062876AF30F054 \ +# Brandon Williams + B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ +# Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ +# Sam Tunnicliffe (CODE SIGNING KEY) + F8B7FD00E05C932991A2CD6150EE103D162C5A55 + +ENV CASSANDRA_VERSION 4.1-beta1 +ENV CASSANDRA_SHA512 40f1b6877b1fcccdc5c6b6895e1c919bb4f17f119256bb600c4c749f9b6ca4f1e53341fde4bac9ddefc516d429b1d0909f359a87c5382dd0f3b3440ae3139084 + +RUN set -eux; \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + rm -rf /var/lib/apt/lists/*; \ + \ + ddist() { \ + local f="$1"; shift; \ + local distFile="$1"; shift; \ + local success=; \ + local distUrl=; \ + for distUrl in \ +# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 + 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ +# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ + https://www-us.apache.org/dist/ \ + https://www.apache.org/dist/ \ + https://archive.apache.org/dist/ \ + ; do \ + if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + }; \ + \ + ddist 'cassandra-bin.tgz' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz"; \ + echo "$CASSANDRA_SHA512 *cassandra-bin.tgz" | sha512sum --check --strict -; \ + \ + ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ + done; \ + gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ + rm -rf "$GNUPGHOME"; \ + \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + \ + mkdir -p "$CASSANDRA_HOME"; \ + tar --extract --file cassandra-bin.tgz --directory "$CASSANDRA_HOME" --strip-components 1; \ + rm cassandra-bin.tgz*; \ + \ + [ ! -e "$CASSANDRA_CONF" ]; \ + mv "$CASSANDRA_HOME/conf" "$CASSANDRA_CONF"; \ + ln -sT "$CASSANDRA_CONF" "$CASSANDRA_HOME/conf"; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + ppc64el) \ +# https://issues.apache.org/jira/browse/CASSANDRA-13345 +# "The stack size specified is too small, Specify at least 328k" + grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm-server.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm-server.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm-server.options"; \ + ;; \ + esac; \ + \ + mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod -R a+rwX "$CASSANDRA_CONF"; \ + ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ + ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ + \ +# smoke test + cassandra -v + +VOLUME /var/lib/cassandra + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + +# 7000: intra-node communication +# 7001: TLS intra-node communication +# 7199: JMX +# 9042: CQL +# 9160: thrift service +EXPOSE 7000 7001 7199 9042 9160 +CMD ["cassandra", "-f"] diff --git a/4.1/docker-entrypoint.sh b/4.1/docker-entrypoint.sh new file mode 100755 index 0000000..6549f83 --- /dev/null +++ b/4.1/docker-entrypoint.sh @@ -0,0 +1,94 @@ +#!/bin/bash +set -e + +# first arg is `-f` or `--some-option` +# or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- cassandra -f "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then + find "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra \ + \! -user cassandra -exec chown cassandra '{}' + + exec gosu cassandra "$BASH_SOURCE" "$@" +fi + +_ip_address() { + # scrape the first non-localhost IP address of the container + # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first + ip address | awk ' + $1 != "inet" { next } # only lines with ip addresses + $NF == "lo" { next } # skip loopback devices + $2 ~ /^127[.]/ { next } # skip loopback addresses + $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses + { + gsub(/\/.+$/, "", $2) + print $2 + exit + } + ' +} + +# "sed -i", but without "mv" (which doesn't work on a bind-mounted file, for example) +_sed-in-place() { + local filename="$1"; shift + local tempFile + tempFile="$(mktemp)" + sed "$@" "$filename" > "$tempFile" + cat "$tempFile" > "$filename" + rm "$tempFile" +} + +if [ "$1" = 'cassandra' ]; then + : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} + + : ${CASSANDRA_LISTEN_ADDRESS='auto'} + if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then + CASSANDRA_LISTEN_ADDRESS="$(_ip_address)" + fi + + : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} + + if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then + CASSANDRA_BROADCAST_ADDRESS="$(_ip_address)" + fi + : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} + + if [ -n "${CASSANDRA_NAME:+1}" ]; then + : ${CASSANDRA_SEEDS:="cassandra"} + fi + : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} + + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ + -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' + + for yaml in \ + broadcast_address \ + broadcast_rpc_address \ + cluster_name \ + endpoint_snitch \ + listen_address \ + num_tokens \ + rpc_address \ + start_rpc \ + ; do + var="CASSANDRA_${yaml^^}" + val="${!var}" + if [ "$val" ]; then + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ + -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' + fi + done + + for rackdc in dc rack; do + var="CASSANDRA_${rackdc^^}" + val="${!var}" + if [ "$val" ]; then + _sed-in-place "$CASSANDRA_CONF/cassandra-rackdc.properties" \ + -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' + fi + done +fi + +exec "$@" diff --git a/versions.json b/versions.json index c98d128..a98eef6 100644 --- a/versions.json +++ b/versions.json @@ -13,5 +13,10 @@ "java": "11", "sha512": "07c2a2f018c5921bfe0d7afba877a23d0ac5bbda05b9414abc60b4fae761115d0fb650eb226247b66d62c450d7eeadc95b6e270ebf0339d8263222fe5d49b07b", "version": "4.0.6" + }, + "4.1": { + "java": "11", + "sha512": "40f1b6877b1fcccdc5c6b6895e1c919bb4f17f119256bb600c4c749f9b6ca4f1e53341fde4bac9ddefc516d429b1d0909f359a87c5382dd0f3b3440ae3139084", + "version": "4.1-beta1" } } From e312f6fb62f1a63ff700ac553f7d031b133afd52 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Fri, 14 Oct 2022 17:13:58 -0700 Subject: [PATCH 153/223] Switch to "$GITHUB_OUTPUT"; update actions/checkout to v3 - https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands - https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter --- .github/workflows/ci.yml | 6 +++--- .github/workflows/verify-templating.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 155ef31..e105455 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,14 +18,14 @@ jobs: outputs: strategy: ${{ steps.generate-jobs.outputs.strategy }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - id: generate-jobs name: Generate Jobs run: | git clone --depth 1 https://github.com/docker-library/bashbrew.git -b master ~/bashbrew strategy="$(~/bashbrew/scripts/github-actions/generate.sh)" + echo "strategy=$strategy" >> "$GITHUB_OUTPUT" jq . <<<"$strategy" # sanity check / debugging aid - echo "::set-output name=strategy::$strategy" test: needs: generate-jobs @@ -33,7 +33,7 @@ jobs: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Prepare Environment run: ${{ matrix.runs.prepare }} - name: Pull Dependencies diff --git a/.github/workflows/verify-templating.yml b/.github/workflows/verify-templating.yml index 7e833f1..14497be 100644 --- a/.github/workflows/verify-templating.yml +++ b/.github/workflows/verify-templating.yml @@ -13,7 +13,7 @@ jobs: name: Check For Uncomitted Changes runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Apply Templates run: ./apply-templates.sh - name: Check Git Status From e92196fdba778656678a9bc9bcb724b8a3584149 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Sun, 23 Oct 2022 13:24:14 -0700 Subject: [PATCH 154/223] Update 3.0 to 3.0.28 --- 3.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 42720c7..a7ad959 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 3.0.27 -ENV CASSANDRA_SHA512 3848241517197b815e219af5c3cabdf6303d7bbabf9e21afdbd979c7e07ece8c49d8cdefb558013a451c1ef386a35440c647147731521d2ec6aa1887b37cacf1 +ENV CASSANDRA_VERSION 3.0.28 +ENV CASSANDRA_SHA512 60e041241e6f91bf729a4922f84b5a6bdb6c7d76700a84e505932c6fda7ebefc007bf38fb6477d83aac525d14771eecd38e2e45a007b434ab6495ec1d617cfd4 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index a98eef6..f206f91 100644 --- a/versions.json +++ b/versions.json @@ -1,8 +1,8 @@ { "3.0": { "java": "8", - "sha512": "3848241517197b815e219af5c3cabdf6303d7bbabf9e21afdbd979c7e07ece8c49d8cdefb558013a451c1ef386a35440c647147731521d2ec6aa1887b37cacf1", - "version": "3.0.27" + "sha512": "60e041241e6f91bf729a4922f84b5a6bdb6c7d76700a84e505932c6fda7ebefc007bf38fb6477d83aac525d14771eecd38e2e45a007b434ab6495ec1d617cfd4", + "version": "3.0.28" }, "3.11": { "java": "8", From 13e3d6ca1ff1b6c9d780e5f018887c1d28318d50 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Sun, 23 Oct 2022 13:26:03 -0700 Subject: [PATCH 155/223] Update 3.11 to 3.11.14 --- 3.11/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 954233b..5a70430 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 3.11.13 -ENV CASSANDRA_SHA512 d356a27a355797f490a36ef14f6e0062c0f77e180ca29debbaa8a92b073e8a922010ad91b911c2a075117d0399d712bda2ac90724430884dd1e3297b6c5e064d +ENV CASSANDRA_VERSION 3.11.14 +ENV CASSANDRA_SHA512 04ee6fa283079e58c9e8eb36bafa8a56ac1373a8845cad55e6f23e508f8bb19955b7bc70ad571ee351bb580c87181c521beeaadce14adbd9d9c87e86c2d15ec2 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index f206f91..f8c3d8c 100644 --- a/versions.json +++ b/versions.json @@ -6,8 +6,8 @@ }, "3.11": { "java": "8", - "sha512": "d356a27a355797f490a36ef14f6e0062c0f77e180ca29debbaa8a92b073e8a922010ad91b911c2a075117d0399d712bda2ac90724430884dd1e3297b6c5e064d", - "version": "3.11.13" + "sha512": "04ee6fa283079e58c9e8eb36bafa8a56ac1373a8845cad55e6f23e508f8bb19955b7bc70ad571ee351bb580c87181c521beeaadce14adbd9d9c87e86c2d15ec2", + "version": "3.11.14" }, "4.0": { "java": "11", From 08fa5553ad2dde684ca5337c7fedd173cbc41f39 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Sun, 23 Oct 2022 13:27:14 -0700 Subject: [PATCH 156/223] Update 4.0 to 4.0.7 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 6a7d495..57eac83 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 4.0.6 -ENV CASSANDRA_SHA512 07c2a2f018c5921bfe0d7afba877a23d0ac5bbda05b9414abc60b4fae761115d0fb650eb226247b66d62c450d7eeadc95b6e270ebf0339d8263222fe5d49b07b +ENV CASSANDRA_VERSION 4.0.7 +ENV CASSANDRA_SHA512 99e5fe5411fb2f82dc588091923a192211f9fda911c3b9da8371fe803155063d2f46bbe57c4c118dc1a2971b37f939dad57ec5ab164da91646fbea26798153b2 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index f8c3d8c..051426e 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ }, "4.0": { "java": "11", - "sha512": "07c2a2f018c5921bfe0d7afba877a23d0ac5bbda05b9414abc60b4fae761115d0fb650eb226247b66d62c450d7eeadc95b6e270ebf0339d8263222fe5d49b07b", - "version": "4.0.6" + "sha512": "99e5fe5411fb2f82dc588091923a192211f9fda911c3b9da8371fe803155063d2f46bbe57c4c118dc1a2971b37f939dad57ec5ab164da91646fbea26798153b2", + "version": "4.0.7" }, "4.1": { "java": "11", From 4e7ec3734bd46cb76d45b046de95a96a3dbb15eb Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 16 Nov 2022 13:56:17 -0800 Subject: [PATCH 157/223] Use new "bashbrew" composite action --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e105455..3860c11 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,11 +19,11 @@ jobs: strategy: ${{ steps.generate-jobs.outputs.strategy }} steps: - uses: actions/checkout@v3 + - uses: docker-library/bashbrew@HEAD - id: generate-jobs name: Generate Jobs run: | - git clone --depth 1 https://github.com/docker-library/bashbrew.git -b master ~/bashbrew - strategy="$(~/bashbrew/scripts/github-actions/generate.sh)" + strategy="$("$BASHBREW_SCRIPTS/github-actions/generate.sh")" echo "strategy=$strategy" >> "$GITHUB_OUTPUT" jq . <<<"$strategy" # sanity check / debugging aid From 2fd1447ba5551e25875bc10486583d312937616f Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 22 Nov 2022 07:24:29 -0800 Subject: [PATCH 158/223] Update 4.1 to 4.1-rc1 --- 4.1/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.1/Dockerfile b/4.1/Dockerfile index b3b24a1..af71c0a 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 4.1-beta1 -ENV CASSANDRA_SHA512 40f1b6877b1fcccdc5c6b6895e1c919bb4f17f119256bb600c4c749f9b6ca4f1e53341fde4bac9ddefc516d429b1d0909f359a87c5382dd0f3b3440ae3139084 +ENV CASSANDRA_VERSION 4.1-rc1 +ENV CASSANDRA_SHA512 6ad379355609fefb4d5c1cb4dc4805bf42d07e27d45985f1d3e2a2b5129b98d3ea06b07bcb20494461895b5fd176734a235f873f713777c18ad649099d533bf7 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 051426e..4fe237f 100644 --- a/versions.json +++ b/versions.json @@ -16,7 +16,7 @@ }, "4.1": { "java": "11", - "sha512": "40f1b6877b1fcccdc5c6b6895e1c919bb4f17f119256bb600c4c749f9b6ca4f1e53341fde4bac9ddefc516d429b1d0909f359a87c5382dd0f3b3440ae3139084", - "version": "4.1-beta1" + "sha512": "6ad379355609fefb4d5c1cb4dc4805bf42d07e27d45985f1d3e2a2b5129b98d3ea06b07bcb20494461895b5fd176734a235f873f713777c18ad649099d533bf7", + "version": "4.1-rc1" } } From 835052698f299c06e09ed49c972d6ab7bd2ef223 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 13 Dec 2022 01:24:28 -0800 Subject: [PATCH 159/223] Update 4.1 to 4.1.0 --- 4.1/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.1/Dockerfile b/4.1/Dockerfile index af71c0a..d1421c5 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -86,8 +86,8 @@ ENV GPG_KEYS \ # Sam Tunnicliffe (CODE SIGNING KEY) F8B7FD00E05C932991A2CD6150EE103D162C5A55 -ENV CASSANDRA_VERSION 4.1-rc1 -ENV CASSANDRA_SHA512 6ad379355609fefb4d5c1cb4dc4805bf42d07e27d45985f1d3e2a2b5129b98d3ea06b07bcb20494461895b5fd176734a235f873f713777c18ad649099d533bf7 +ENV CASSANDRA_VERSION 4.1.0 +ENV CASSANDRA_SHA512 d8cb800e99d8905e85a62d1d658c1c3056459e7ba0b27e0997e1c537918be8ab333f2a89cf38cafc04ab4d711fd8c542593548fb30bf6a81329f2b47370389e9 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 4fe237f..c1598fc 100644 --- a/versions.json +++ b/versions.json @@ -16,7 +16,7 @@ }, "4.1": { "java": "11", - "sha512": "6ad379355609fefb4d5c1cb4dc4805bf42d07e27d45985f1d3e2a2b5129b98d3ea06b07bcb20494461895b5fd176734a235f873f713777c18ad649099d533bf7", - "version": "4.1-rc1" + "sha512": "d8cb800e99d8905e85a62d1d658c1c3056459e7ba0b27e0997e1c537918be8ab333f2a89cf38cafc04ab4d711fd8c542593548fb30bf6a81329f2b47370389e9", + "version": "4.1.0" } } From f3414c2a8296f199b5a23b5c716cbe65d3856a1c Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 13 Dec 2022 10:45:32 -0800 Subject: [PATCH 160/223] Update "latest" to 4.1 (now GA) --- generate-stackbrew-library.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 7234a48..b4b810f 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -3,7 +3,7 @@ set -eu declare -A aliases=( [3.11]='3' - [4.0]='4 latest' + [4.1]='4 latest' ) self="$(basename "$BASH_SOURCE")" From 4637e84fb5cbb861f99ff912de62b88cac7289c4 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 20 Dec 2022 14:15:26 -0800 Subject: [PATCH 161/223] Update generated README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 284a01c..8fcdf5f 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,12 @@ For outstanding `cassandra` image PRs, check [PRs with the "library/cassandra" l --- -- [![build status badge](https://img.shields.io/github/workflow/status/docker-library/cassandra/GitHub%20CI/master?label=GitHub%20CI)](https://github.com/docker-library/cassandra/actions?query=workflow%3A%22GitHub+CI%22+branch%3Amaster) +- [![build status badge](https://img.shields.io/github/actions/workflow/status/docker-library/cassandra/ci.yml?branch=master&label=GitHub%20CI)](https://github.com/docker-library/cassandra/actions?query=workflow%3A%22GitHub+CI%22+branch%3Amaster) - [![build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/update.sh/job/cassandra.svg?label=Automated%20update.sh)](https://doi-janky.infosiftr.net/job/update.sh/job/cassandra/) | Build | Status | Badges | (per-arch) | |:-:|:-:|:-:|:-:| | [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra/) | [![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/cassandra.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/cassandra/) | [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra/) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra/) | -| [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/cassandra.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/cassandra/) | +| [![s390x build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/s390x/job/cassandra.svg?label=s390x)](https://doi-janky.infosiftr.net/job/multiarch/job/s390x/job/cassandra/) | [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/cassandra.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/cassandra/) | From 16cbbcd19ecb8b2d09fc3b71ecfd5896be754b1b Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 30 Jan 2023 10:37:39 -0800 Subject: [PATCH 162/223] Update to gosu 1.16 See https://github.com/tianon/gosu/releases/tag/1.16 (especially https://github.com/tianon/gosu/blob/master/SECURITY.md) --- 3.0/Dockerfile | 2 +- 3.11/Dockerfile | 2 +- 4.0/Dockerfile | 2 +- 4.1/Dockerfile | 2 +- Dockerfile.template | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index a7ad959..4867f15 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -35,7 +35,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.14 +ENV GOSU_VERSION 1.16 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 5a70430..40010cb 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -35,7 +35,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.14 +ENV GOSU_VERSION 1.16 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 57eac83..4c98e5c 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -35,7 +35,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.14 +ENV GOSU_VERSION 1.16 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/4.1/Dockerfile b/4.1/Dockerfile index d1421c5..a66251f 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -35,7 +35,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.14 +ENV GOSU_VERSION 1.16 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/Dockerfile.template b/Dockerfile.template index 08013fd..42d1297 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -40,7 +40,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.14 +ENV GOSU_VERSION 1.16 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ From bbe25add57171af90838151e419b7cdafc921e3c Mon Sep 17 00:00:00 2001 From: Joseph Ferguson Date: Tue, 14 Feb 2023 16:32:34 -0800 Subject: [PATCH 163/223] update from KEYS file, bump to 4.0.8 --- 3.0/Dockerfile | 6 +++++- 3.11/Dockerfile | 6 +++++- 4.0/Dockerfile | 10 +++++++--- 4.1/Dockerfile | 6 +++++- Dockerfile.template | 6 +++++- versions.json | 4 ++-- 6 files changed, 29 insertions(+), 9 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 4867f15..4bba668 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -84,7 +84,11 @@ ENV GPG_KEYS \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ # Sam Tunnicliffe (CODE SIGNING KEY) - F8B7FD00E05C932991A2CD6150EE103D162C5A55 + F8B7FD00E05C932991A2CD6150EE103D162C5A55 \ +# Stefan Miklosovic + 7464AAD9068241C50BA6A26232F35CB2F546D93E \ +# Berenguer Blasi (Code Signing Key) + CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 ENV CASSANDRA_VERSION 3.0.28 ENV CASSANDRA_SHA512 60e041241e6f91bf729a4922f84b5a6bdb6c7d76700a84e505932c6fda7ebefc007bf38fb6477d83aac525d14771eecd38e2e45a007b434ab6495ec1d617cfd4 diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 40010cb..19e4701 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -84,7 +84,11 @@ ENV GPG_KEYS \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ # Sam Tunnicliffe (CODE SIGNING KEY) - F8B7FD00E05C932991A2CD6150EE103D162C5A55 + F8B7FD00E05C932991A2CD6150EE103D162C5A55 \ +# Stefan Miklosovic + 7464AAD9068241C50BA6A26232F35CB2F546D93E \ +# Berenguer Blasi (Code Signing Key) + CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 ENV CASSANDRA_VERSION 3.11.14 ENV CASSANDRA_SHA512 04ee6fa283079e58c9e8eb36bafa8a56ac1373a8845cad55e6f23e508f8bb19955b7bc70ad571ee351bb580c87181c521beeaadce14adbd9d9c87e86c2d15ec2 diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 4c98e5c..5de686c 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -84,10 +84,14 @@ ENV GPG_KEYS \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ # Sam Tunnicliffe (CODE SIGNING KEY) - F8B7FD00E05C932991A2CD6150EE103D162C5A55 + F8B7FD00E05C932991A2CD6150EE103D162C5A55 \ +# Stefan Miklosovic + 7464AAD9068241C50BA6A26232F35CB2F546D93E \ +# Berenguer Blasi (Code Signing Key) + CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.7 -ENV CASSANDRA_SHA512 99e5fe5411fb2f82dc588091923a192211f9fda911c3b9da8371fe803155063d2f46bbe57c4c118dc1a2971b37f939dad57ec5ab164da91646fbea26798153b2 +ENV CASSANDRA_VERSION 4.0.8 +ENV CASSANDRA_SHA512 6cb37f7266f446a23f32d73a128f7e96056b8829cbe653b1ecb4683fd4dab8f0d7a13357f7ee4ee2d6cc77dcbd97ca3dcce017334b9d129b01ca2b0660bc7ee6 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/4.1/Dockerfile b/4.1/Dockerfile index a66251f..93197f0 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -84,7 +84,11 @@ ENV GPG_KEYS \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ # Sam Tunnicliffe (CODE SIGNING KEY) - F8B7FD00E05C932991A2CD6150EE103D162C5A55 + F8B7FD00E05C932991A2CD6150EE103D162C5A55 \ +# Stefan Miklosovic + 7464AAD9068241C50BA6A26232F35CB2F546D93E \ +# Berenguer Blasi (Code Signing Key) + CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 ENV CASSANDRA_VERSION 4.1.0 ENV CASSANDRA_SHA512 d8cb800e99d8905e85a62d1d658c1c3056459e7ba0b27e0997e1c537918be8ab333f2a89cf38cafc04ab4d711fd8c542593548fb30bf6a81329f2b47370389e9 diff --git a/Dockerfile.template b/Dockerfile.template index 42d1297..a3b3a2d 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -89,7 +89,11 @@ ENV GPG_KEYS \ # Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ # Sam Tunnicliffe (CODE SIGNING KEY) - F8B7FD00E05C932991A2CD6150EE103D162C5A55 + F8B7FD00E05C932991A2CD6150EE103D162C5A55 \ +# Stefan Miklosovic + 7464AAD9068241C50BA6A26232F35CB2F546D93E \ +# Berenguer Blasi (Code Signing Key) + CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 ENV CASSANDRA_VERSION {{ .version }} ENV CASSANDRA_SHA512 {{ .sha512 }} diff --git a/versions.json b/versions.json index c1598fc..a761c6a 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ }, "4.0": { "java": "11", - "sha512": "99e5fe5411fb2f82dc588091923a192211f9fda911c3b9da8371fe803155063d2f46bbe57c4c118dc1a2971b37f939dad57ec5ab164da91646fbea26798153b2", - "version": "4.0.7" + "sha512": "6cb37f7266f446a23f32d73a128f7e96056b8829cbe653b1ecb4683fd4dab8f0d7a13357f7ee4ee2d6cc77dcbd97ca3dcce017334b9d129b01ca2b0660bc7ee6", + "version": "4.0.8" }, "4.1": { "java": "11", From 1737da9eb0a7ba2e691778355730816f9fa7bad9 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 10 Mar 2023 15:53:48 -0800 Subject: [PATCH 164/223] Update permissions from 777 to 1777 This still supports the "arbitrary user" use case but with slightly tighter permissions on the end result. --- 3.0/Dockerfile | 2 +- 3.11/Dockerfile | 2 +- 4.0/Dockerfile | 2 +- 4.1/Dockerfile | 2 +- Dockerfile.template | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 4bba668..d651d59 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -156,7 +156,7 @@ RUN set -eux; \ \ mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ - chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 1777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chmod -R a+rwX "$CASSANDRA_CONF"; \ ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 19e4701..ed77883 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -156,7 +156,7 @@ RUN set -eux; \ \ mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ - chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 1777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chmod -R a+rwX "$CASSANDRA_CONF"; \ ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 5de686c..8d7129b 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -156,7 +156,7 @@ RUN set -eux; \ \ mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ - chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 1777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chmod -R a+rwX "$CASSANDRA_CONF"; \ ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ diff --git a/4.1/Dockerfile b/4.1/Dockerfile index 93197f0..b954099 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -156,7 +156,7 @@ RUN set -eux; \ \ mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ - chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 1777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chmod -R a+rwX "$CASSANDRA_CONF"; \ ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ diff --git a/Dockerfile.template b/Dockerfile.template index a3b3a2d..80b8925 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -171,7 +171,7 @@ RUN set -eux; \ \ mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ - chmod 777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 1777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ chmod -R a+rwX "$CASSANDRA_CONF"; \ ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ From f4c092b5dd80ccf6eaf656965b6c3738e32f6534 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 21 Mar 2023 07:24:23 -0700 Subject: [PATCH 165/223] Update 4.1 to 4.1.1 --- 4.1/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.1/Dockerfile b/4.1/Dockerfile index 93197f0..ea076cf 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.1.0 -ENV CASSANDRA_SHA512 d8cb800e99d8905e85a62d1d658c1c3056459e7ba0b27e0997e1c537918be8ab333f2a89cf38cafc04ab4d711fd8c542593548fb30bf6a81329f2b47370389e9 +ENV CASSANDRA_VERSION 4.1.1 +ENV CASSANDRA_SHA512 dc11ce5c0485d2d54d0fff3ae35d1b7f1c3e32055c0699206f59a5bbe983b50972ceb4638bfe65a7c80a6db5052b70ad75718525eef812ba9ae6a301fd5bc8be RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index a761c6a..1a04992 100644 --- a/versions.json +++ b/versions.json @@ -16,7 +16,7 @@ }, "4.1": { "java": "11", - "sha512": "d8cb800e99d8905e85a62d1d658c1c3056459e7ba0b27e0997e1c537918be8ab333f2a89cf38cafc04ab4d711fd8c542593548fb30bf6a81329f2b47370389e9", - "version": "4.1.0" + "sha512": "dc11ce5c0485d2d54d0fff3ae35d1b7f1c3e32055c0699206f59a5bbe983b50972ceb4638bfe65a7c80a6db5052b70ad75718525eef812ba9ae6a301fd5bc8be", + "version": "4.1.1" } } From b5915c67f0cd255700a71a24f3b314a0280f81c6 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 14 Apr 2023 07:24:18 -0700 Subject: [PATCH 166/223] Update 4.0 to 4.0.9 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 8d7129b..757b292 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.8 -ENV CASSANDRA_SHA512 6cb37f7266f446a23f32d73a128f7e96056b8829cbe653b1ecb4683fd4dab8f0d7a13357f7ee4ee2d6cc77dcbd97ca3dcce017334b9d129b01ca2b0660bc7ee6 +ENV CASSANDRA_VERSION 4.0.9 +ENV CASSANDRA_SHA512 94ec77fec09ed69912dd1da98f39e5e5d68aba8003180b62a0b0599cf6bae895a0944c9e0ac2b966d4e7658c188782025ab82f32e9f3139c5090d28be470e0a2 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 1a04992..96c7148 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ }, "4.0": { "java": "11", - "sha512": "6cb37f7266f446a23f32d73a128f7e96056b8829cbe653b1ecb4683fd4dab8f0d7a13357f7ee4ee2d6cc77dcbd97ca3dcce017334b9d129b01ca2b0660bc7ee6", - "version": "4.0.8" + "sha512": "94ec77fec09ed69912dd1da98f39e5e5d68aba8003180b62a0b0599cf6bae895a0944c9e0ac2b966d4e7658c188782025ab82f32e9f3139c5090d28be470e0a2", + "version": "4.0.9" }, "4.1": { "java": "11", From 5951b45c36ee557b33cd8a108f5e08f1654ef5e8 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 28 Apr 2023 15:03:47 -0700 Subject: [PATCH 167/223] Remove explicit `dirmngr` reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is pulled in automatically via `gnupg`, and moved from `Recommends` to `Depends` in https://salsa.debian.org/debian/gnupg2/-/commit/99474ad900a8bcdd0e7b68f986fec0013fc01470, which has been part of `src:gnupg2` since 2.1.21-4 (and every supported version of both Debian _and_ Ubuntu have 2.2.x 😇). --- 3.0/Dockerfile | 4 ++-- 3.11/Dockerfile | 4 ++-- 4.0/Dockerfile | 4 ++-- 4.1/Dockerfile | 4 ++-- Dockerfile.template | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index d651d59..cabd206 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -39,7 +39,7 @@ ENV GOSU_VERSION 1.16 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + apt-get install -y --no-install-recommends ca-certificates gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ @@ -96,7 +96,7 @@ ENV CASSANDRA_SHA512 60e041241e6f91bf729a4922f84b5a6bdb6c7d76700a84e505932c6fda7 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + apt-get install -y --no-install-recommends ca-certificates gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ \ ddist() { \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index ed77883..dbb22d9 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -39,7 +39,7 @@ ENV GOSU_VERSION 1.16 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + apt-get install -y --no-install-recommends ca-certificates gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ @@ -96,7 +96,7 @@ ENV CASSANDRA_SHA512 04ee6fa283079e58c9e8eb36bafa8a56ac1373a8845cad55e6f23e508f8 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + apt-get install -y --no-install-recommends ca-certificates gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ \ ddist() { \ diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 757b292..0282f86 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -39,7 +39,7 @@ ENV GOSU_VERSION 1.16 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + apt-get install -y --no-install-recommends ca-certificates gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ @@ -96,7 +96,7 @@ ENV CASSANDRA_SHA512 94ec77fec09ed69912dd1da98f39e5e5d68aba8003180b62a0b0599cf6b RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + apt-get install -y --no-install-recommends ca-certificates gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ \ ddist() { \ diff --git a/4.1/Dockerfile b/4.1/Dockerfile index 0f3d0c4..05e5707 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -39,7 +39,7 @@ ENV GOSU_VERSION 1.16 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + apt-get install -y --no-install-recommends ca-certificates gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ @@ -96,7 +96,7 @@ ENV CASSANDRA_SHA512 dc11ce5c0485d2d54d0fff3ae35d1b7f1c3e32055c0699206f59a5bbe98 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + apt-get install -y --no-install-recommends ca-certificates gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ \ ddist() { \ diff --git a/Dockerfile.template b/Dockerfile.template index 80b8925..8804228 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -44,7 +44,7 @@ ENV GOSU_VERSION 1.16 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + apt-get install -y --no-install-recommends ca-certificates gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ @@ -101,7 +101,7 @@ ENV CASSANDRA_SHA512 {{ .sha512 }} RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates dirmngr gnupg wget; \ + apt-get install -y --no-install-recommends ca-certificates gnupg wget; \ rm -rf /var/lib/apt/lists/*; \ \ ddist() { \ From 7f0ca5fd56b2397688f4de64cd5d15ef54b581ec Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 5 May 2023 07:24:15 -0700 Subject: [PATCH 168/223] Update 3.11 to 3.11.15 --- 3.11/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index dbb22d9..31df28d 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 3.11.14 -ENV CASSANDRA_SHA512 04ee6fa283079e58c9e8eb36bafa8a56ac1373a8845cad55e6f23e508f8bb19955b7bc70ad571ee351bb580c87181c521beeaadce14adbd9d9c87e86c2d15ec2 +ENV CASSANDRA_VERSION 3.11.15 +ENV CASSANDRA_SHA512 a8de34b57d38a425a9308bee185f1731f46a2977666952ac0ba811ffbb9cbeacb9b08aaf1012951195ba6f94983323afeaf6e51f0f7af5fea34c6d8ac87ca699 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 96c7148..bcdce22 100644 --- a/versions.json +++ b/versions.json @@ -6,8 +6,8 @@ }, "3.11": { "java": "8", - "sha512": "04ee6fa283079e58c9e8eb36bafa8a56ac1373a8845cad55e6f23e508f8bb19955b7bc70ad571ee351bb580c87181c521beeaadce14adbd9d9c87e86c2d15ec2", - "version": "3.11.14" + "sha512": "a8de34b57d38a425a9308bee185f1731f46a2977666952ac0ba811ffbb9cbeacb9b08aaf1012951195ba6f94983323afeaf6e51f0f7af5fea34c6d8ac87ca699", + "version": "3.11.15" }, "4.0": { "java": "11", From 0472adffa9e3b3361f2dbe4b089592d1cb84d36d Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 15 May 2023 13:24:10 -0700 Subject: [PATCH 169/223] Update 3.0 to 3.0.29 --- 3.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index cabd206..4b265a7 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 3.0.28 -ENV CASSANDRA_SHA512 60e041241e6f91bf729a4922f84b5a6bdb6c7d76700a84e505932c6fda7ebefc007bf38fb6477d83aac525d14771eecd38e2e45a007b434ab6495ec1d617cfd4 +ENV CASSANDRA_VERSION 3.0.29 +ENV CASSANDRA_SHA512 31515e20fb1356ae8cf277c52954ea711c4e158f852cd8bee096775f1f0a2b6847fe972d4755f061b45578f7ed688237b8ead84b38c77bcccfd6f8c022db520b RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index bcdce22..b5880ef 100644 --- a/versions.json +++ b/versions.json @@ -1,8 +1,8 @@ { "3.0": { "java": "8", - "sha512": "60e041241e6f91bf729a4922f84b5a6bdb6c7d76700a84e505932c6fda7ebefc007bf38fb6477d83aac525d14771eecd38e2e45a007b434ab6495ec1d617cfd4", - "version": "3.0.28" + "sha512": "31515e20fb1356ae8cf277c52954ea711c4e158f852cd8bee096775f1f0a2b6847fe972d4755f061b45578f7ed688237b8ead84b38c77bcccfd6f8c022db520b", + "version": "3.0.29" }, "3.11": { "java": "8", From 4802b868f5684890ed82a6ec1c8b32141c0dc73c Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 29 May 2023 07:24:19 -0700 Subject: [PATCH 170/223] Update 4.0 to 4.0.10 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 0282f86..7a013d0 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.9 -ENV CASSANDRA_SHA512 94ec77fec09ed69912dd1da98f39e5e5d68aba8003180b62a0b0599cf6bae895a0944c9e0ac2b966d4e7658c188782025ab82f32e9f3139c5090d28be470e0a2 +ENV CASSANDRA_VERSION 4.0.10 +ENV CASSANDRA_SHA512 c398ae90597f25036a424d9fd61806f76939f40a144945db75247da28bd1a0476ba5679fd0318fefe7fc5be4533f734028119f03f718cc91f471f01d971563cb RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index b5880ef..ed4b35e 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ }, "4.0": { "java": "11", - "sha512": "94ec77fec09ed69912dd1da98f39e5e5d68aba8003180b62a0b0599cf6bae895a0944c9e0ac2b966d4e7658c188782025ab82f32e9f3139c5090d28be470e0a2", - "version": "4.0.9" + "sha512": "c398ae90597f25036a424d9fd61806f76939f40a144945db75247da28bd1a0476ba5679fd0318fefe7fc5be4533f734028119f03f718cc91f471f01d971563cb", + "version": "4.0.10" }, "4.1": { "java": "11", From 676c7fb1737244ff736edc56064af335cf9d466f Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 29 May 2023 07:27:02 -0700 Subject: [PATCH 171/223] Update 4.1 to 4.1.2 --- 4.1/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.1/Dockerfile b/4.1/Dockerfile index 05e5707..4bd16d3 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.1.1 -ENV CASSANDRA_SHA512 dc11ce5c0485d2d54d0fff3ae35d1b7f1c3e32055c0699206f59a5bbe983b50972ceb4638bfe65a7c80a6db5052b70ad75718525eef812ba9ae6a301fd5bc8be +ENV CASSANDRA_VERSION 4.1.2 +ENV CASSANDRA_SHA512 e6ba9efc46743547130cbcd0e174d6761e442f97b17732df8f15d25c9dcf5eaf009e0ac550aad3e34e5f8fc1b300062ad248def3ca85ef372d20d745698f01f9 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index ed4b35e..48028ce 100644 --- a/versions.json +++ b/versions.json @@ -16,7 +16,7 @@ }, "4.1": { "java": "11", - "sha512": "dc11ce5c0485d2d54d0fff3ae35d1b7f1c3e32055c0699206f59a5bbe983b50972ceb4638bfe65a7c80a6db5052b70ad75718525eef812ba9ae6a301fd5bc8be", - "version": "4.1.1" + "sha512": "e6ba9efc46743547130cbcd0e174d6761e442f97b17732df8f15d25c9dcf5eaf009e0ac550aad3e34e5f8fc1b300062ad248def3ca85ef372d20d745698f01f9", + "version": "4.1.2" } } From 955064939ae306088491856ff169b58319d619f9 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 18 Jul 2023 07:24:19 -0700 Subject: [PATCH 172/223] Update 4.0 to 4.0.11 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 7a013d0..cb745d1 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.10 -ENV CASSANDRA_SHA512 c398ae90597f25036a424d9fd61806f76939f40a144945db75247da28bd1a0476ba5679fd0318fefe7fc5be4533f734028119f03f718cc91f471f01d971563cb +ENV CASSANDRA_VERSION 4.0.11 +ENV CASSANDRA_SHA512 92bd35819e86927709add1075023af5aed93d42e0115bfa6b675b15e93b31bffa6fd3b9ff95a403bb9650ec417a0567ac776c88b56fe373938451746bbc64a50 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 48028ce..659d623 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ }, "4.0": { "java": "11", - "sha512": "c398ae90597f25036a424d9fd61806f76939f40a144945db75247da28bd1a0476ba5679fd0318fefe7fc5be4533f734028119f03f718cc91f471f01d971563cb", - "version": "4.0.10" + "sha512": "92bd35819e86927709add1075023af5aed93d42e0115bfa6b675b15e93b31bffa6fd3b9ff95a403bb9650ec417a0567ac776c88b56fe373938451746bbc64a50", + "version": "4.0.11" }, "4.1": { "java": "11", From 44614387cda4278e477056c24cde3070f679a32a Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 24 Jul 2023 13:24:23 -0700 Subject: [PATCH 173/223] Update 4.1 to 4.1.3 --- 4.1/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.1/Dockerfile b/4.1/Dockerfile index 4bd16d3..baa86a7 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.1.2 -ENV CASSANDRA_SHA512 e6ba9efc46743547130cbcd0e174d6761e442f97b17732df8f15d25c9dcf5eaf009e0ac550aad3e34e5f8fc1b300062ad248def3ca85ef372d20d745698f01f9 +ENV CASSANDRA_VERSION 4.1.3 +ENV CASSANDRA_SHA512 393443a5b9849645362df2f7536e734e1fc6d513aadf440fab8dda3063553394a138805098796d35f9d4d31e2899ecab630a2ec2a44d00d5e63bed549a2e844c RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 659d623..f120fd1 100644 --- a/versions.json +++ b/versions.json @@ -16,7 +16,7 @@ }, "4.1": { "java": "11", - "sha512": "e6ba9efc46743547130cbcd0e174d6761e442f97b17732df8f15d25c9dcf5eaf009e0ac550aad3e34e5f8fc1b300062ad248def3ca85ef372d20d745698f01f9", - "version": "4.1.2" + "sha512": "393443a5b9849645362df2f7536e734e1fc6d513aadf440fab8dda3063553394a138805098796d35f9d4d31e2899ecab630a2ec2a44d00d5e63bed549a2e844c", + "version": "4.1.3" } } From 76e413ded2e5eb2c61d97296d01400d2fff2d6d5 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Sun, 20 Aug 2023 07:24:17 -0700 Subject: [PATCH 174/223] Update 3.11 to 3.11.16 --- 3.11/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 31df28d..e270d0a 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 3.11.15 -ENV CASSANDRA_SHA512 a8de34b57d38a425a9308bee185f1731f46a2977666952ac0ba811ffbb9cbeacb9b08aaf1012951195ba6f94983323afeaf6e51f0f7af5fea34c6d8ac87ca699 +ENV CASSANDRA_VERSION 3.11.16 +ENV CASSANDRA_SHA512 5bc76508fec8ff9d4fcfa3c53b0c9550ef37ad771e568b2634df2ba5377c378237c968f1d2bfb1078ecc30c034aea63b4c481826bb9ac26536f1f4f336cd8286 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index f120fd1..547c83e 100644 --- a/versions.json +++ b/versions.json @@ -6,8 +6,8 @@ }, "3.11": { "java": "8", - "sha512": "a8de34b57d38a425a9308bee185f1731f46a2977666952ac0ba811ffbb9cbeacb9b08aaf1012951195ba6f94983323afeaf6e51f0f7af5fea34c6d8ac87ca699", - "version": "3.11.15" + "sha512": "5bc76508fec8ff9d4fcfa3c53b0c9550ef37ad771e568b2634df2ba5377c378237c968f1d2bfb1078ecc30c034aea63b4c481826bb9ac26536f1f4f336cd8286", + "version": "3.11.16" }, "4.0": { "java": "11", From 01dffce9d5d205f61733cbffaaf8973cc586219b Mon Sep 17 00:00:00 2001 From: Joseph Ferguson Date: Mon, 2 Oct 2023 11:43:30 -0700 Subject: [PATCH 175/223] Add 5.0-alpha release --- 5.0/Dockerfile | 178 +++++++++++++++++++++++++++++++++++++++ 5.0/docker-entrypoint.sh | 94 +++++++++++++++++++++ versions.json | 5 ++ versions.sh | 7 +- 4 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 5.0/Dockerfile create mode 100755 5.0/docker-entrypoint.sh diff --git a/5.0/Dockerfile b/5.0/Dockerfile new file mode 100644 index 0000000..d6125fc --- /dev/null +++ b/5.0/Dockerfile @@ -0,0 +1,178 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM eclipse-temurin:17-jre-focal + +# explicitly set user/group IDs +RUN set -eux; \ + groupadd -r cassandra --gid=999; \ + useradd -r -g cassandra --uid=999 cassandra + +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ +# solves warning: "jemalloc shared library could not be preloaded to speed up memory allocations" + libjemalloc2 \ +# "free" is used by cassandra-env.sh + procps \ +# "cqlsh" needs a python interpreter + python3 \ +# "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) + iproute2 \ +# Cassandra will automatically use numactl if available +# https://github.com/apache/cassandra/blob/18bcda2d4c2eba7370a0b21f33eed37cb730bbb3/bin/cassandra#L90-L100 +# https://github.com/apache/cassandra/commit/604c0e87dc67fa65f6904ef9a98a029c9f2f865a + numactl \ + ; \ + rm -rf /var/lib/apt/lists/*; \ +# https://issues.apache.org/jira/browse/CASSANDRA-15767 ("bin/cassandra" only looks for "libjemalloc.so" or "libjemalloc.so.1" which doesn't match our "libjemalloc.so.2") + libjemalloc="$(readlink -e /usr/lib/*/libjemalloc.so.2)"; \ + ln -sT "$libjemalloc" /usr/local/lib/libjemalloc.so; \ + ldconfig + +# grab gosu for easy step-down from root +# https://github.com/tianon/gosu/releases +ENV GOSU_VERSION 1.16 +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/*; \ + dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \ + 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 CASSANDRA_HOME /opt/cassandra +ENV CASSANDRA_CONF /etc/cassandra +ENV PATH $CASSANDRA_HOME/bin:$PATH + +# https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging#DebianPackaging-AddingRepositoryKeys +# $ docker run --rm buildpack-deps:bullseye-curl bash -c 'wget -qO- https://downloads.apache.org/cassandra/KEYS | gpg --batch --import &> /dev/null && gpg --batch --list-keys --with-fingerprint --with-colons' | awk -F: '$1 == "pub" && $2 == "-" { pub = 1 } pub && $1 == "fpr" { fpr = $10 } $1 == "sub" { pub = 0 } pub && fpr && $1 == "uid" && $2 == "-" { print "#", $10; print "\t" fpr " \\"; pub = 0 }' +ENV GPG_KEYS \ +# Eric Evans + CEC86BB4A0BA9D0F90397CAEF8358FA2F2833C93 \ +# Eric Evans + C4965EE9E3015D192CCCF2B6F758CE318D77295D \ +# Sylvain Lebresne (pcmanus) + 5AED1BF378E9A19DADE1BCB34BD736A82B5C1B00 \ +# T Jake Luciani + 514A2AD631A57A16DD0047EC749D6EEC0353B12C \ +# Michael Shuler + A26E528B271F19B9E5D8E19EA278B781FE4B2BDA \ +# Michael Semb Wever + A4C465FEA0C552561A392A61E91335D77E3E87CB \ +# Alex Petrov + 9E66CEC6106D578D0B1EB9BFF1000962B7F6840C \ +# Jordan West + C4009872C59B49561310D966D0062876AF30F054 \ +# Brandon Williams + B7842CDAF36E6A3214FAE35D5E85B9AE0B84C041 \ +# Ekaterina Buryanova Dimitrova (CODE SIGNING KEY) + 3E9C876907A560ACA00964F363E9BAD215BBF5F0 \ +# Sam Tunnicliffe (CODE SIGNING KEY) + F8B7FD00E05C932991A2CD6150EE103D162C5A55 \ +# Stefan Miklosovic + 7464AAD9068241C50BA6A26232F35CB2F546D93E \ +# Berenguer Blasi (Code Signing Key) + CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 + +ENV CASSANDRA_VERSION 5.0-alpha1 +ENV CASSANDRA_SHA512 095aede626067da34fc60c04c528030e3860d7489752a9200cf0bcffd93f18c1158512759bb56b85d65def98cfec3580a9edea9dfa5addfd80bd4ceab8a84ebf + +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/*; \ + \ + ddist() { \ + local f="$1"; shift; \ + local distFile="$1"; shift; \ + local success=; \ + local distUrl=; \ + for distUrl in \ +# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 + 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ +# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ + https://www-us.apache.org/dist/ \ + https://www.apache.org/dist/ \ + https://archive.apache.org/dist/ \ + ; do \ + if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + }; \ + \ + ddist 'cassandra-bin.tgz' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz"; \ + echo "$CASSANDRA_SHA512 *cassandra-bin.tgz" | sha512sum --check --strict -; \ + \ + ddist 'cassandra-bin.tgz.asc' "cassandra/$CASSANDRA_VERSION/apache-cassandra-$CASSANDRA_VERSION-bin.tar.gz.asc"; \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \ + done; \ + gpg --batch --verify cassandra-bin.tgz.asc cassandra-bin.tgz; \ + rm -rf "$GNUPGHOME"; \ + \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ + \ + mkdir -p "$CASSANDRA_HOME"; \ + tar --extract --file cassandra-bin.tgz --directory "$CASSANDRA_HOME" --strip-components 1; \ + rm cassandra-bin.tgz*; \ + \ + [ ! -e "$CASSANDRA_CONF" ]; \ + mv "$CASSANDRA_HOME/conf" "$CASSANDRA_CONF"; \ + ln -sT "$CASSANDRA_CONF" "$CASSANDRA_HOME/conf"; \ + \ + dpkgArch="$(dpkg --print-architecture)"; \ + case "$dpkgArch" in \ + ppc64el) \ +# https://issues.apache.org/jira/browse/CASSANDRA-13345 +# "The stack size specified is too small, Specify at least 328k" + grep -- '^-Xss256k$' "$CASSANDRA_CONF/jvm-server.options"; \ + sed -ri 's/^-Xss256k$/-Xss512k/' "$CASSANDRA_CONF/jvm-server.options"; \ + grep -- '^-Xss512k$' "$CASSANDRA_CONF/jvm-server.options"; \ + ;; \ + esac; \ + \ + mkdir -p "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chown -R cassandra:cassandra "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod 1777 "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra; \ + chmod -R a+rwX "$CASSANDRA_CONF"; \ + ln -sT /var/lib/cassandra "$CASSANDRA_HOME/data"; \ + ln -sT /var/log/cassandra "$CASSANDRA_HOME/logs"; \ + \ +# smoke test + cassandra -v + +VOLUME /var/lib/cassandra + +COPY docker-entrypoint.sh /usr/local/bin/ +ENTRYPOINT ["docker-entrypoint.sh"] + +# 7000: intra-node communication +# 7001: TLS intra-node communication +# 7199: JMX +# 9042: CQL +# 9160: thrift service +EXPOSE 7000 7001 7199 9042 9160 +CMD ["cassandra", "-f"] diff --git a/5.0/docker-entrypoint.sh b/5.0/docker-entrypoint.sh new file mode 100755 index 0000000..6549f83 --- /dev/null +++ b/5.0/docker-entrypoint.sh @@ -0,0 +1,94 @@ +#!/bin/bash +set -e + +# first arg is `-f` or `--some-option` +# or there are no args +if [ "$#" -eq 0 ] || [ "${1#-}" != "$1" ]; then + set -- cassandra -f "$@" +fi + +# allow the container to be started with `--user` +if [ "$1" = 'cassandra' -a "$(id -u)" = '0' ]; then + find "$CASSANDRA_CONF" /var/lib/cassandra /var/log/cassandra \ + \! -user cassandra -exec chown cassandra '{}' + + exec gosu cassandra "$BASH_SOURCE" "$@" +fi + +_ip_address() { + # scrape the first non-localhost IP address of the container + # in Swarm Mode, we often get two IPs -- the container IP, and the (shared) VIP, and the container IP should always be first + ip address | awk ' + $1 != "inet" { next } # only lines with ip addresses + $NF == "lo" { next } # skip loopback devices + $2 ~ /^127[.]/ { next } # skip loopback addresses + $2 ~ /^169[.]254[.]/ { next } # skip link-local addresses + { + gsub(/\/.+$/, "", $2) + print $2 + exit + } + ' +} + +# "sed -i", but without "mv" (which doesn't work on a bind-mounted file, for example) +_sed-in-place() { + local filename="$1"; shift + local tempFile + tempFile="$(mktemp)" + sed "$@" "$filename" > "$tempFile" + cat "$tempFile" > "$filename" + rm "$tempFile" +} + +if [ "$1" = 'cassandra' ]; then + : ${CASSANDRA_RPC_ADDRESS='0.0.0.0'} + + : ${CASSANDRA_LISTEN_ADDRESS='auto'} + if [ "$CASSANDRA_LISTEN_ADDRESS" = 'auto' ]; then + CASSANDRA_LISTEN_ADDRESS="$(_ip_address)" + fi + + : ${CASSANDRA_BROADCAST_ADDRESS="$CASSANDRA_LISTEN_ADDRESS"} + + if [ "$CASSANDRA_BROADCAST_ADDRESS" = 'auto' ]; then + CASSANDRA_BROADCAST_ADDRESS="$(_ip_address)" + fi + : ${CASSANDRA_BROADCAST_RPC_ADDRESS:=$CASSANDRA_BROADCAST_ADDRESS} + + if [ -n "${CASSANDRA_NAME:+1}" ]; then + : ${CASSANDRA_SEEDS:="cassandra"} + fi + : ${CASSANDRA_SEEDS:="$CASSANDRA_BROADCAST_ADDRESS"} + + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ + -r 's/(- seeds:).*/\1 "'"$CASSANDRA_SEEDS"'"/' + + for yaml in \ + broadcast_address \ + broadcast_rpc_address \ + cluster_name \ + endpoint_snitch \ + listen_address \ + num_tokens \ + rpc_address \ + start_rpc \ + ; do + var="CASSANDRA_${yaml^^}" + val="${!var}" + if [ "$val" ]; then + _sed-in-place "$CASSANDRA_CONF/cassandra.yaml" \ + -r 's/^(# )?('"$yaml"':).*/\2 '"$val"'/' + fi + done + + for rackdc in dc rack; do + var="CASSANDRA_${rackdc^^}" + val="${!var}" + if [ "$val" ]; then + _sed-in-place "$CASSANDRA_CONF/cassandra-rackdc.properties" \ + -r 's/^('"$rackdc"'=).*/\1 '"$val"'/' + fi + done +fi + +exec "$@" diff --git a/versions.json b/versions.json index 547c83e..310ad84 100644 --- a/versions.json +++ b/versions.json @@ -18,5 +18,10 @@ "java": "11", "sha512": "393443a5b9849645362df2f7536e734e1fc6d513aadf440fab8dda3063553394a138805098796d35f9d4d31e2899ecab630a2ec2a44d00d5e63bed549a2e844c", "version": "4.1.3" + }, + "5.0": { + "java": "17", + "sha512": "095aede626067da34fc60c04c528030e3860d7489752a9200cf0bcffd93f18c1158512759bb56b85d65def98cfec3580a9edea9dfa5addfd80bd4ceab8a84ebf", + "version": "5.0-alpha1" } } diff --git a/versions.sh b/versions.sh index 1e4d2aa..766a27c 100755 --- a/versions.sh +++ b/versions.sh @@ -1,10 +1,15 @@ #!/usr/bin/env bash set -Eeuo pipefail -defaultJavaVersion='11' +# https://cassandra.apache.org/doc/5.0/cassandra/installing/installing.html#prerequisites +# https://cassandra.apache.org/doc/4.1/cassandra/getting_started/installing.html#prerequisites +# https://cassandra.apache.org/doc/3.11/cassandra/getting_started/installing.html#prerequisites +defaultJavaVersion='17' declare -A javaVersions=( [3.0]='8' [3.11]='8' + [4.0]='11' + [4.1]='11' ) cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" From b9899662ae5192c4e6e27c33059047f84d423fa0 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 4 Oct 2023 01:24:20 -0700 Subject: [PATCH 176/223] Update 4.0 to 4.0.9 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index cb745d1..0282f86 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.11 -ENV CASSANDRA_SHA512 92bd35819e86927709add1075023af5aed93d42e0115bfa6b675b15e93b31bffa6fd3b9ff95a403bb9650ec417a0567ac776c88b56fe373938451746bbc64a50 +ENV CASSANDRA_VERSION 4.0.9 +ENV CASSANDRA_SHA512 94ec77fec09ed69912dd1da98f39e5e5d68aba8003180b62a0b0599cf6bae895a0944c9e0ac2b966d4e7658c188782025ab82f32e9f3139c5090d28be470e0a2 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 547c83e..5fbe9eb 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ }, "4.0": { "java": "11", - "sha512": "92bd35819e86927709add1075023af5aed93d42e0115bfa6b675b15e93b31bffa6fd3b9ff95a403bb9650ec417a0567ac776c88b56fe373938451746bbc64a50", - "version": "4.0.11" + "sha512": "94ec77fec09ed69912dd1da98f39e5e5d68aba8003180b62a0b0599cf6bae895a0944c9e0ac2b966d4e7658c188782025ab82f32e9f3139c5090d28be470e0a2", + "version": "4.0.9" }, "4.1": { "java": "11", From b57fae57e886db7b46c0851ed761b6b0a260f065 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 4 Oct 2023 07:24:23 -0700 Subject: [PATCH 177/223] Update 4.0 to 4.0.11 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 0282f86..cb745d1 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.9 -ENV CASSANDRA_SHA512 94ec77fec09ed69912dd1da98f39e5e5d68aba8003180b62a0b0599cf6bae895a0944c9e0ac2b966d4e7658c188782025ab82f32e9f3139c5090d28be470e0a2 +ENV CASSANDRA_VERSION 4.0.11 +ENV CASSANDRA_SHA512 92bd35819e86927709add1075023af5aed93d42e0115bfa6b675b15e93b31bffa6fd3b9ff95a403bb9650ec417a0567ac776c88b56fe373938451746bbc64a50 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 5fbe9eb..547c83e 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ }, "4.0": { "java": "11", - "sha512": "94ec77fec09ed69912dd1da98f39e5e5d68aba8003180b62a0b0599cf6bae895a0944c9e0ac2b966d4e7658c188782025ab82f32e9f3139c5090d28be470e0a2", - "version": "4.0.9" + "sha512": "92bd35819e86927709add1075023af5aed93d42e0115bfa6b675b15e93b31bffa6fd3b9ff95a403bb9650ec417a0567ac776c88b56fe373938451746bbc64a50", + "version": "4.0.11" }, "4.1": { "java": "11", From 12ee728efc59b4aa6cc02c637396c8460ee1e3cd Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Sat, 4 Nov 2023 07:24:28 -0700 Subject: [PATCH 178/223] Update 5.0 to 5.0-alpha2 --- 5.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.0/Dockerfile b/5.0/Dockerfile index d6125fc..6e6023b 100644 --- a/5.0/Dockerfile +++ b/5.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 5.0-alpha1 -ENV CASSANDRA_SHA512 095aede626067da34fc60c04c528030e3860d7489752a9200cf0bcffd93f18c1158512759bb56b85d65def98cfec3580a9edea9dfa5addfd80bd4ceab8a84ebf +ENV CASSANDRA_VERSION 5.0-alpha2 +ENV CASSANDRA_SHA512 f4476871b3d55a49c0e492dbf5d8f2f46cd0e82f1614cc0697daddd64c74c66883df3c45ce00bd028ea86ed88c3a30e1f36bcdcd929d225e38bd1c848c9d5841 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 310ad84..0f0115a 100644 --- a/versions.json +++ b/versions.json @@ -21,7 +21,7 @@ }, "5.0": { "java": "17", - "sha512": "095aede626067da34fc60c04c528030e3860d7489752a9200cf0bcffd93f18c1158512759bb56b85d65def98cfec3580a9edea9dfa5addfd80bd4ceab8a84ebf", - "version": "5.0-alpha1" + "sha512": "f4476871b3d55a49c0e492dbf5d8f2f46cd0e82f1614cc0697daddd64c74c66883df3c45ce00bd028ea86ed88c3a30e1f36bcdcd929d225e38bd1c848c9d5841", + "version": "5.0-alpha2" } } From a735f1a91518f379a1279a543744e797fabedde4 Mon Sep 17 00:00:00 2001 From: Laurent Goderre Date: Mon, 6 Nov 2023 15:25:00 -0500 Subject: [PATCH 179/223] Add version alias for version 5 --- generate-stackbrew-library.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index b4b810f..dab2180 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -1,9 +1,10 @@ -#!/bin/bash +#!/usr/bin/env bash set -eu declare -A aliases=( [3.11]='3' [4.1]='4 latest' + [5.0]='5' ) self="$(basename "$BASH_SOURCE")" From 8313dd9e2e5d049117c1aa190494702f5ee60c83 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 5 Dec 2023 07:24:28 -0800 Subject: [PATCH 180/223] Update 5.0 to 5.0-beta1 --- 5.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.0/Dockerfile b/5.0/Dockerfile index 6e6023b..206d919 100644 --- a/5.0/Dockerfile +++ b/5.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 5.0-alpha2 -ENV CASSANDRA_SHA512 f4476871b3d55a49c0e492dbf5d8f2f46cd0e82f1614cc0697daddd64c74c66883df3c45ce00bd028ea86ed88c3a30e1f36bcdcd929d225e38bd1c848c9d5841 +ENV CASSANDRA_VERSION 5.0-beta1 +ENV CASSANDRA_SHA512 d67aa211858f090dca6ea2ac84ed405bd4791aaf493e3c8e5b24fd44e54aa3132eeca3f4e310d6d1aad1ca105515011d6e177d169a6e94af0a257ffc95b4f175 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 0f0115a..bf7e964 100644 --- a/versions.json +++ b/versions.json @@ -21,7 +21,7 @@ }, "5.0": { "java": "17", - "sha512": "f4476871b3d55a49c0e492dbf5d8f2f46cd0e82f1614cc0697daddd64c74c66883df3c45ce00bd028ea86ed88c3a30e1f36bcdcd929d225e38bd1c848c9d5841", - "version": "5.0-alpha2" + "sha512": "d67aa211858f090dca6ea2ac84ed405bd4791aaf493e3c8e5b24fd44e54aa3132eeca3f4e310d6d1aad1ca105515011d6e177d169a6e94af0a257ffc95b4f175", + "version": "5.0-beta1" } } From 3937857e971639452447a00740cbe32b08bc5dca Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 21 Dec 2023 16:24:49 -0800 Subject: [PATCH 181/223] Automatically update JRE base images Right now we're on focal across the board -- this will update us to jammy (although this commit does not perform the jammy update so the automation can do so instead) This *also* adds "suite aliases" like we've added elsewhere so that when we do apply the jammy update, there's an easy escape hatch for users (because that's a likely seccomp hassle update). --- Dockerfile.template | 2 +- generate-stackbrew-library.sh | 5 ++++ versions.json | 50 ++++++++++++++++++++++++++++------- versions.sh | 21 ++++++++++++--- 4 files changed, 64 insertions(+), 14 deletions(-) diff --git a/Dockerfile.template b/Dockerfile.template index 8804228..50ffccd 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -1,7 +1,7 @@ {{ def major: env.version | split(".")[0] | tonumber -}} -FROM eclipse-temurin:{{ .java }}-jre-focal +FROM {{ .FROM.version }} # explicitly set user/group IDs RUN set -eux; \ diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index dab2180..a299120 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -82,6 +82,11 @@ for version; do fi versionAliases+=( ${aliases[$version]:-} ) + suite="$(jq -r '.[env.version].FROM.base' versions.json)" + suiteAliases=( "${versionAliases[@]/%/-$suite}" ) + suiteAliases=( "${suiteAliases[@]//latest-/}" ) + versionAliases+=( "${suiteAliases[@]}" ) + parent="$(awk 'toupper($1) == "FROM" { print $2 }' "$version/Dockerfile")" arches="${parentRepoToArches[$parent]}" diff --git a/versions.json b/versions.json index bf7e964..d0b8f47 100644 --- a/versions.json +++ b/versions.json @@ -1,27 +1,57 @@ { "3.0": { - "java": "8", + "version": "3.0.29", "sha512": "31515e20fb1356ae8cf277c52954ea711c4e158f852cd8bee096775f1f0a2b6847fe972d4755f061b45578f7ed688237b8ead84b38c77bcccfd6f8c022db520b", - "version": "3.0.29" + "java": { + "version": "8" + }, + "FROM": { + "version": "eclipse-temurin:8-jre-focal", + "base": "focal" + } }, "3.11": { - "java": "8", + "version": "3.11.16", "sha512": "5bc76508fec8ff9d4fcfa3c53b0c9550ef37ad771e568b2634df2ba5377c378237c968f1d2bfb1078ecc30c034aea63b4c481826bb9ac26536f1f4f336cd8286", - "version": "3.11.16" + "java": { + "version": "8" + }, + "FROM": { + "version": "eclipse-temurin:8-jre-focal", + "base": "focal" + } }, "4.0": { - "java": "11", + "version": "4.0.11", "sha512": "92bd35819e86927709add1075023af5aed93d42e0115bfa6b675b15e93b31bffa6fd3b9ff95a403bb9650ec417a0567ac776c88b56fe373938451746bbc64a50", - "version": "4.0.11" + "java": { + "version": "11" + }, + "FROM": { + "version": "eclipse-temurin:11-jre-focal", + "base": "focal" + } }, "4.1": { - "java": "11", + "version": "4.1.3", "sha512": "393443a5b9849645362df2f7536e734e1fc6d513aadf440fab8dda3063553394a138805098796d35f9d4d31e2899ecab630a2ec2a44d00d5e63bed549a2e844c", - "version": "4.1.3" + "java": { + "version": "11" + }, + "FROM": { + "version": "eclipse-temurin:11-jre-focal", + "base": "focal" + } }, "5.0": { - "java": "17", + "version": "5.0-beta1", "sha512": "d67aa211858f090dca6ea2ac84ed405bd4791aaf493e3c8e5b24fd44e54aa3132eeca3f4e310d6d1aad1ca105515011d6e177d169a6e94af0a257ffc95b4f175", - "version": "5.0-beta1" + "java": { + "version": "17" + }, + "FROM": { + "version": "eclipse-temurin:17-jre-focal", + "base": "focal" + } } } diff --git a/versions.sh b/versions.sh index 766a27c..1714741 100755 --- a/versions.sh +++ b/versions.sh @@ -50,15 +50,30 @@ for version in "${versions[@]}"; do export javaVersion="${javaVersions[$version]:-$defaultJavaVersion}" - echo "$version: $fullVersion" + # for the given Java version, find the "default" Eclipse Temurin tag with stable specificity ("X-jre-SUITE") + from="$( + bashbrew --arch amd64 list --arch-filter "https://github.com/docker-library/official-images/raw/HEAD/library/eclipse-temurin:$javaVersion-jre" \ + | grep -F ":$javaVersion-jre-" \ + | tail -1 + )" + export from + + echo "$version: $fullVersion (FROM $from)" json="$(jq <<<"$json" -c ' .[env.version] = { version: env.fullVersion, sha512: env.sha512, - java: env.javaVersion, + java: { + version: env.javaVersion, + }, + FROM: { + # this structure is a little bit awkward, but gives us nice commit messages like "Update 5.0 to FROM eclipse-temurin:17-jre-jammy" + version: env.from, + base: (env.from | split(":\(env.javaVersion)-jre-")[1]), + }, } ')" done -jq <<<"$json" -S . > versions.json +jq <<<"$json" . > versions.json From 66348dba5ed2ea13d9d5a7ff6c0b51f2383d012b Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 2 Jan 2024 10:27:12 -0800 Subject: [PATCH 182/223] Update 4.0 to FROM eclipse-temurin:11-jre-jammy --- 4.0/Dockerfile | 2 +- versions.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index cb745d1..98b21a1 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM eclipse-temurin:11-jre-focal +FROM eclipse-temurin:11-jre-jammy # explicitly set user/group IDs RUN set -eux; \ diff --git a/versions.json b/versions.json index d0b8f47..30887a8 100644 --- a/versions.json +++ b/versions.json @@ -28,8 +28,8 @@ "version": "11" }, "FROM": { - "version": "eclipse-temurin:11-jre-focal", - "base": "focal" + "version": "eclipse-temurin:11-jre-jammy", + "base": "jammy" } }, "4.1": { From 8cdda79acc014840c36161dfad2f5d4368e778a6 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 2 Jan 2024 10:29:33 -0800 Subject: [PATCH 183/223] Update 4.1 to FROM eclipse-temurin:11-jre-jammy --- 4.1/Dockerfile | 2 +- versions.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/4.1/Dockerfile b/4.1/Dockerfile index baa86a7..ee6dd60 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM eclipse-temurin:11-jre-focal +FROM eclipse-temurin:11-jre-jammy # explicitly set user/group IDs RUN set -eux; \ diff --git a/versions.json b/versions.json index 30887a8..73640c2 100644 --- a/versions.json +++ b/versions.json @@ -39,8 +39,8 @@ "version": "11" }, "FROM": { - "version": "eclipse-temurin:11-jre-focal", - "base": "focal" + "version": "eclipse-temurin:11-jre-jammy", + "base": "jammy" } }, "5.0": { From 2c12419510e30fb7fbacf4b1e3da31dc464d925a Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 2 Jan 2024 10:30:56 -0800 Subject: [PATCH 184/223] Update 5.0 to FROM eclipse-temurin:17-jre-jammy --- 5.0/Dockerfile | 2 +- versions.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/5.0/Dockerfile b/5.0/Dockerfile index 206d919..e892b86 100644 --- a/5.0/Dockerfile +++ b/5.0/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM eclipse-temurin:17-jre-focal +FROM eclipse-temurin:17-jre-jammy # explicitly set user/group IDs RUN set -eux; \ diff --git a/versions.json b/versions.json index 73640c2..47c1d60 100644 --- a/versions.json +++ b/versions.json @@ -50,8 +50,8 @@ "version": "17" }, "FROM": { - "version": "eclipse-temurin:17-jre-focal", - "base": "focal" + "version": "eclipse-temurin:17-jre-jammy", + "base": "jammy" } } } From a03ffc36eeae058d081370c7f251a9066722fa4b Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 2 Jan 2024 10:53:13 -0800 Subject: [PATCH 185/223] Switch to "python2" explicitly for 3.x versions --- 3.0/Dockerfile | 2 +- 3.11/Dockerfile | 2 +- Dockerfile.template | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 4b265a7..7f03bc5 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -19,7 +19,7 @@ RUN set -eux; \ # "free" is used by cassandra-env.sh procps \ # "cqlsh" needs a python interpreter - python \ + python2 \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ # Cassandra will automatically use numactl if available diff --git a/3.11/Dockerfile b/3.11/Dockerfile index e270d0a..6d9f1fe 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -19,7 +19,7 @@ RUN set -eux; \ # "free" is used by cassandra-env.sh procps \ # "cqlsh" needs a python interpreter - python \ + python2 \ # "ip" is not required by Cassandra itself, but is commonly used in scripting Cassandra's configuration (since it is so fixated on explicit IP addresses) iproute2 \ # Cassandra will automatically use numactl if available diff --git a/Dockerfile.template b/Dockerfile.template index 50ffccd..8674e6b 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -19,9 +19,12 @@ RUN set -eux; \ {{ # python3 is only supported in 4.0+ # https://issues.apache.org/jira/browse/CASSANDRA-10190 + # https://github.com/apache/cassandra/blob/cassandra-3.11.16/bin/cqlsh#L18-L26 + # https://github.com/apache/cassandra/blob/cassandra-3.0.29/bin/cqlsh#L18-L26 + # (only looking for/accepting Python 2.7 specifically) if major < 4 then ( -}} - python \ + python2 \ {{ ) else ( -}} python3 \ {{ ) end -}} From 6e4848e04a9f6f36e7e03e99cc3087bbf7ccb49f Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 2 Jan 2024 10:53:42 -0800 Subject: [PATCH 186/223] Update 3.0 to FROM eclipse-temurin:8-jre-jammy --- 3.0/Dockerfile | 2 +- versions.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 7f03bc5..efb1d6c 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM eclipse-temurin:8-jre-focal +FROM eclipse-temurin:8-jre-jammy # explicitly set user/group IDs RUN set -eux; \ diff --git a/versions.json b/versions.json index 47c1d60..9d4c5f8 100644 --- a/versions.json +++ b/versions.json @@ -6,8 +6,8 @@ "version": "8" }, "FROM": { - "version": "eclipse-temurin:8-jre-focal", - "base": "focal" + "version": "eclipse-temurin:8-jre-jammy", + "base": "jammy" } }, "3.11": { From a1e2446ab30903f6a21e1c06831a45ab763f2719 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 2 Jan 2024 10:55:18 -0800 Subject: [PATCH 187/223] Update 3.11 to FROM eclipse-temurin:8-jre-jammy --- 3.11/Dockerfile | 2 +- versions.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 6d9f1fe..ee83e64 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM eclipse-temurin:8-jre-focal +FROM eclipse-temurin:8-jre-jammy # explicitly set user/group IDs RUN set -eux; \ diff --git a/versions.json b/versions.json index 9d4c5f8..4de5797 100644 --- a/versions.json +++ b/versions.json @@ -17,8 +17,8 @@ "version": "8" }, "FROM": { - "version": "eclipse-temurin:8-jre-focal", - "base": "focal" + "version": "eclipse-temurin:8-jre-jammy", + "base": "jammy" } }, "4.0": { From 47ea6259ee03f28639ffb493b847067689d59c2e Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 16 Jan 2024 10:43:13 -0800 Subject: [PATCH 188/223] Update Apache project mirrors See https://apache.org/history/mirror-history.html --- 3.0/Dockerfile | 8 +++----- 3.11/Dockerfile | 8 +++----- 4.0/Dockerfile | 8 +++----- 4.1/Dockerfile | 8 +++----- 5.0/Dockerfile | 8 +++----- Dockerfile.template | 8 +++----- 6 files changed, 18 insertions(+), 30 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index efb1d6c..f1b64ce 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -105,11 +105,9 @@ RUN set -eux; \ local success=; \ local distUrl=; \ for distUrl in \ -# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 - 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ -# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ - https://www-us.apache.org/dist/ \ - https://www.apache.org/dist/ \ +# https://github.com/docker-library/tomcat/pull/308 + https://dlcdn.apache.org/ \ +# if the version is outdated, we have to pull from the archive https://archive.apache.org/dist/ \ ; do \ if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index ee83e64..d230a09 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -105,11 +105,9 @@ RUN set -eux; \ local success=; \ local distUrl=; \ for distUrl in \ -# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 - 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ -# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ - https://www-us.apache.org/dist/ \ - https://www.apache.org/dist/ \ +# https://github.com/docker-library/tomcat/pull/308 + https://dlcdn.apache.org/ \ +# if the version is outdated, we have to pull from the archive https://archive.apache.org/dist/ \ ; do \ if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 98b21a1..bd4c41b 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -105,11 +105,9 @@ RUN set -eux; \ local success=; \ local distUrl=; \ for distUrl in \ -# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 - 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ -# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ - https://www-us.apache.org/dist/ \ - https://www.apache.org/dist/ \ +# https://github.com/docker-library/tomcat/pull/308 + https://dlcdn.apache.org/ \ +# if the version is outdated, we have to pull from the archive https://archive.apache.org/dist/ \ ; do \ if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ diff --git a/4.1/Dockerfile b/4.1/Dockerfile index ee6dd60..e12c9fe 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -105,11 +105,9 @@ RUN set -eux; \ local success=; \ local distUrl=; \ for distUrl in \ -# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 - 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ -# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ - https://www-us.apache.org/dist/ \ - https://www.apache.org/dist/ \ +# https://github.com/docker-library/tomcat/pull/308 + https://dlcdn.apache.org/ \ +# if the version is outdated, we have to pull from the archive https://archive.apache.org/dist/ \ ; do \ if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ diff --git a/5.0/Dockerfile b/5.0/Dockerfile index e892b86..88643ef 100644 --- a/5.0/Dockerfile +++ b/5.0/Dockerfile @@ -105,11 +105,9 @@ RUN set -eux; \ local success=; \ local distUrl=; \ for distUrl in \ -# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 - 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ -# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ - https://www-us.apache.org/dist/ \ - https://www.apache.org/dist/ \ +# https://github.com/docker-library/tomcat/pull/308 + https://dlcdn.apache.org/ \ +# if the version is outdated, we have to pull from the archive https://archive.apache.org/dist/ \ ; do \ if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ diff --git a/Dockerfile.template b/Dockerfile.template index 8674e6b..231b424 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -113,11 +113,9 @@ RUN set -eux; \ local success=; \ local distUrl=; \ for distUrl in \ -# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394 - 'https://www.apache.org/dyn/closer.cgi?action=download&filename=' \ -# if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/ - https://www-us.apache.org/dist/ \ - https://www.apache.org/dist/ \ +# https://github.com/docker-library/tomcat/pull/308 + https://dlcdn.apache.org/ \ +# if the version is outdated, we have to pull from the archive https://archive.apache.org/dist/ \ ; do \ if wget --progress=dot:giga -O "$f" "$distUrl$distFile" && [ -s "$f" ]; then \ From 6aa49ecdcc9150e03abb379e258e85401989d91b Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 23 Jan 2024 13:24:22 -0800 Subject: [PATCH 189/223] Update 4.0 to 4.0.12 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index bd4c41b..5503770 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.11 -ENV CASSANDRA_SHA512 92bd35819e86927709add1075023af5aed93d42e0115bfa6b675b15e93b31bffa6fd3b9ff95a403bb9650ec417a0567ac776c88b56fe373938451746bbc64a50 +ENV CASSANDRA_VERSION 4.0.12 +ENV CASSANDRA_SHA512 65de9cc32f3d22d55f5c7c3b1417285a41aabb70fa8a4ae8d9d85a58e644f43151bf4f386cc45773b6ac317db38c4576b139ca6b6fcdbbd16993d09ee2a5c2b8 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 4de5797..22290ad 100644 --- a/versions.json +++ b/versions.json @@ -22,8 +22,8 @@ } }, "4.0": { - "version": "4.0.11", - "sha512": "92bd35819e86927709add1075023af5aed93d42e0115bfa6b675b15e93b31bffa6fd3b9ff95a403bb9650ec417a0567ac776c88b56fe373938451746bbc64a50", + "version": "4.0.12", + "sha512": "65de9cc32f3d22d55f5c7c3b1417285a41aabb70fa8a4ae8d9d85a58e644f43151bf4f386cc45773b6ac317db38c4576b139ca6b6fcdbbd16993d09ee2a5c2b8", "java": { "version": "11" }, From 4ad6334c48772ac0d795d777c1ad9a6b37b85eb3 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 14 Feb 2024 13:24:28 -0800 Subject: [PATCH 190/223] Update 4.1 to 4.1.4 --- 4.1/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.1/Dockerfile b/4.1/Dockerfile index e12c9fe..35ebbf6 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.1.3 -ENV CASSANDRA_SHA512 393443a5b9849645362df2f7536e734e1fc6d513aadf440fab8dda3063553394a138805098796d35f9d4d31e2899ecab630a2ec2a44d00d5e63bed549a2e844c +ENV CASSANDRA_VERSION 4.1.4 +ENV CASSANDRA_SHA512 ddc9f4157a6e272b421850c7787b822bae36c72ab2dce711a91dc24fe18bf56f2cd91c61410243cdc0eeeb5f2a7e5419f8a531863116026996bd3f167c36a916 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 22290ad..ec5b3bf 100644 --- a/versions.json +++ b/versions.json @@ -33,8 +33,8 @@ } }, "4.1": { - "version": "4.1.3", - "sha512": "393443a5b9849645362df2f7536e734e1fc6d513aadf440fab8dda3063553394a138805098796d35f9d4d31e2899ecab630a2ec2a44d00d5e63bed549a2e844c", + "version": "4.1.4", + "sha512": "ddc9f4157a6e272b421850c7787b822bae36c72ab2dce711a91dc24fe18bf56f2cd91c61410243cdc0eeeb5f2a7e5419f8a531863116026996bd3f167c36a916", "java": { "version": "11" }, From dd34dfac80c45a1c4e6ac6029e80385c778e8d1d Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 20 Mar 2024 15:45:06 -0700 Subject: [PATCH 191/223] Update to gosu 1.17 --- 3.0/Dockerfile | 2 +- 3.11/Dockerfile | 2 +- 4.0/Dockerfile | 2 +- 4.1/Dockerfile | 2 +- 5.0/Dockerfile | 2 +- Dockerfile.template | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index f1b64ce..d137ea0 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -35,7 +35,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.16 +ENV GOSU_VERSION 1.17 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/3.11/Dockerfile b/3.11/Dockerfile index d230a09..7c5b9f3 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -35,7 +35,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.16 +ENV GOSU_VERSION 1.17 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 5503770..8234268 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -35,7 +35,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.16 +ENV GOSU_VERSION 1.17 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/4.1/Dockerfile b/4.1/Dockerfile index 35ebbf6..6ea0dee 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -35,7 +35,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.16 +ENV GOSU_VERSION 1.17 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/5.0/Dockerfile b/5.0/Dockerfile index 88643ef..1524026 100644 --- a/5.0/Dockerfile +++ b/5.0/Dockerfile @@ -35,7 +35,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.16 +ENV GOSU_VERSION 1.17 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ diff --git a/Dockerfile.template b/Dockerfile.template index 231b424..710118b 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -43,7 +43,7 @@ RUN set -eux; \ # grab gosu for easy step-down from root # https://github.com/tianon/gosu/releases -ENV GOSU_VERSION 1.16 +ENV GOSU_VERSION 1.17 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ From 2324f94cb4e9686859e3f487f725908bfbefc9d2 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 15 Apr 2024 13:24:12 -0700 Subject: [PATCH 192/223] Update 3.0 to 3.0.30 --- 3.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index d137ea0..93540d2 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 3.0.29 -ENV CASSANDRA_SHA512 31515e20fb1356ae8cf277c52954ea711c4e158f852cd8bee096775f1f0a2b6847fe972d4755f061b45578f7ed688237b8ead84b38c77bcccfd6f8c022db520b +ENV CASSANDRA_VERSION 3.0.30 +ENV CASSANDRA_SHA512 d239ae8c51ec9f3c789ed858e2daa8c3a6ee84ba8697c7e7e4037ac3c747451b91b894229aa68d6c829917afe68da408d403d5ac6c29c2d866f01e050b81f43f RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index ec5b3bf..efbefae 100644 --- a/versions.json +++ b/versions.json @@ -1,7 +1,7 @@ { "3.0": { - "version": "3.0.29", - "sha512": "31515e20fb1356ae8cf277c52954ea711c4e158f852cd8bee096775f1f0a2b6847fe972d4755f061b45578f7ed688237b8ead84b38c77bcccfd6f8c022db520b", + "version": "3.0.30", + "sha512": "d239ae8c51ec9f3c789ed858e2daa8c3a6ee84ba8697c7e7e4037ac3c747451b91b894229aa68d6c829917afe68da408d403d5ac6c29c2d866f01e050b81f43f", "java": { "version": "8" }, From abab4c99e553fca077336ca097dd84107f2d3034 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 16 Apr 2024 10:30:31 -0700 Subject: [PATCH 193/223] Update 3.11 to 3.11.17 --- 3.11/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 7c5b9f3..807bd00 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 3.11.16 -ENV CASSANDRA_SHA512 5bc76508fec8ff9d4fcfa3c53b0c9550ef37ad771e568b2634df2ba5377c378237c968f1d2bfb1078ecc30c034aea63b4c481826bb9ac26536f1f4f336cd8286 +ENV CASSANDRA_VERSION 3.11.17 +ENV CASSANDRA_SHA512 640d4d3d6800422b6dd4b8ff137065cc4ef08c55ff235556fb64d5de78f2c1e815618fbc9b14c1b94306cb58cd074ef729452657c7473aa194be9b34e9db481d RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index efbefae..8fb0638 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ } }, "3.11": { - "version": "3.11.16", - "sha512": "5bc76508fec8ff9d4fcfa3c53b0c9550ef37ad771e568b2634df2ba5377c378237c968f1d2bfb1078ecc30c034aea63b4c481826bb9ac26536f1f4f336cd8286", + "version": "3.11.17", + "sha512": "640d4d3d6800422b6dd4b8ff137065cc4ef08c55ff235556fb64d5de78f2c1e815618fbc9b14c1b94306cb58cd074ef729452657c7473aa194be9b34e9db481d", "java": { "version": "8" }, From 7ae558bbbbfa3f07eaaecae0ff84a4537d37c570 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 20 May 2024 07:24:27 -0700 Subject: [PATCH 194/223] Update 4.1 to 4.1.5 --- 4.1/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.1/Dockerfile b/4.1/Dockerfile index 6ea0dee..c3109f2 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.1.4 -ENV CASSANDRA_SHA512 ddc9f4157a6e272b421850c7787b822bae36c72ab2dce711a91dc24fe18bf56f2cd91c61410243cdc0eeeb5f2a7e5419f8a531863116026996bd3f167c36a916 +ENV CASSANDRA_VERSION 4.1.5 +ENV CASSANDRA_SHA512 9b76bcba188c34de0bec7327adb5d4d571df7ac485788e577974f361422c229df17d90925eff20d97090581c01756bc7a7fc8b8f01f99297c90276240e27ebeb RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 8fb0638..80caf28 100644 --- a/versions.json +++ b/versions.json @@ -33,8 +33,8 @@ } }, "4.1": { - "version": "4.1.4", - "sha512": "ddc9f4157a6e272b421850c7787b822bae36c72ab2dce711a91dc24fe18bf56f2cd91c61410243cdc0eeeb5f2a7e5419f8a531863116026996bd3f167c36a916", + "version": "4.1.5", + "sha512": "9b76bcba188c34de0bec7327adb5d4d571df7ac485788e577974f361422c229df17d90925eff20d97090581c01756bc7a7fc8b8f01f99297c90276240e27ebeb", "java": { "version": "11" }, From b51ed0210fc94d22dce73d8f07d1af1a3416d56a Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 20 May 2024 13:24:21 -0700 Subject: [PATCH 195/223] Update 4.0 to 4.0.13 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 8234268..7e072dc 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.12 -ENV CASSANDRA_SHA512 65de9cc32f3d22d55f5c7c3b1417285a41aabb70fa8a4ae8d9d85a58e644f43151bf4f386cc45773b6ac317db38c4576b139ca6b6fcdbbd16993d09ee2a5c2b8 +ENV CASSANDRA_VERSION 4.0.13 +ENV CASSANDRA_SHA512 4172ef70aa4c51fb463c62019643c1d62c16f6c9a175ff4d9d1e869b234983a68694a4167946a3f70d4556f8c5f2494b809090e2cec3cb327956478028e95bf5 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 80caf28..b263975 100644 --- a/versions.json +++ b/versions.json @@ -22,8 +22,8 @@ } }, "4.0": { - "version": "4.0.12", - "sha512": "65de9cc32f3d22d55f5c7c3b1417285a41aabb70fa8a4ae8d9d85a58e644f43151bf4f386cc45773b6ac317db38c4576b139ca6b6fcdbbd16993d09ee2a5c2b8", + "version": "4.0.13", + "sha512": "4172ef70aa4c51fb463c62019643c1d62c16f6c9a175ff4d9d1e869b234983a68694a4167946a3f70d4556f8c5f2494b809090e2cec3cb327956478028e95bf5", "java": { "version": "11" }, From a2a374e7670ccbac726af799ce58916c7fa6556a Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 9 Jul 2024 15:34:51 -0700 Subject: [PATCH 196/223] =?UTF-8?q?Update=20to=20actions/checkout@v4=20?= =?UTF-8?q?=F0=9F=99=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (this is effectively a functional no-op solving a "problem" that really ought to be solved at a different level within GHA) --- .github/workflows/ci.yml | 4 ++-- .github/workflows/verify-templating.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3860c11..c4c0ead 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: outputs: strategy: ${{ steps.generate-jobs.outputs.strategy }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: docker-library/bashbrew@HEAD - id: generate-jobs name: Generate Jobs @@ -33,7 +33,7 @@ jobs: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Prepare Environment run: ${{ matrix.runs.prepare }} - name: Pull Dependencies diff --git a/.github/workflows/verify-templating.yml b/.github/workflows/verify-templating.yml index 14497be..2e1fb78 100644 --- a/.github/workflows/verify-templating.yml +++ b/.github/workflows/verify-templating.yml @@ -13,7 +13,7 @@ jobs: name: Check For Uncomitted Changes runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Apply Templates run: ./apply-templates.sh - name: Check Git Status From 7ebf445be0a2847cfe94cf1cee3f3b9df891f0d1 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 18 Jul 2024 13:24:31 -0700 Subject: [PATCH 197/223] Update 5.0 to 5.0-rc1 --- 5.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.0/Dockerfile b/5.0/Dockerfile index 1524026..5a4a6ca 100644 --- a/5.0/Dockerfile +++ b/5.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 5.0-beta1 -ENV CASSANDRA_SHA512 d67aa211858f090dca6ea2ac84ed405bd4791aaf493e3c8e5b24fd44e54aa3132eeca3f4e310d6d1aad1ca105515011d6e177d169a6e94af0a257ffc95b4f175 +ENV CASSANDRA_VERSION 5.0-rc1 +ENV CASSANDRA_SHA512 d964d937466876093c962f97735484644a1159dd4b39d8b03ff37a6c3265b063aacb434b76a8b06ffd34f821d78898b2d09dcf9cd02ce7d06d2b957f75ea24d6 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index b263975..cd3d862 100644 --- a/versions.json +++ b/versions.json @@ -44,8 +44,8 @@ } }, "5.0": { - "version": "5.0-beta1", - "sha512": "d67aa211858f090dca6ea2ac84ed405bd4791aaf493e3c8e5b24fd44e54aa3132eeca3f4e310d6d1aad1ca105515011d6e177d169a6e94af0a257ffc95b4f175", + "version": "5.0-rc1", + "sha512": "d964d937466876093c962f97735484644a1159dd4b39d8b03ff37a6c3265b063aacb434b76a8b06ffd34f821d78898b2d09dcf9cd02ce7d06d2b957f75ea24d6", "java": { "version": "17" }, From 6c7cbe97eddeb7559d4c77387731b3c3833c6597 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 1 Aug 2024 10:44:56 -0700 Subject: [PATCH 198/223] Lock all versions to "jammy" (no "noble" auto-upgrade) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Attempts to upgrade 3.x versions to Ubuntu Noble fail because they still require python2 (which is no longer available in Noble). Attempts to upgrade 4.x fail because of incompatibilities with Python 3.12 (which is the version Noble has). Attempts to upgrade 5.x fail because of the above Python 3.12 incompatibility, but with the added benefit of code detecting that we're trying to use Python 3.12 and erroring that no suitable Python version could be found (instead of failing with an obscure `six.moves` import error, like 4.x does). For now, this is an explicit override for every supported version because hope springs eternal that Python 3.12 will be supported eventually and some future 5.x will be able to upgrade to Ubuntu Noble. 🙈 --- versions.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/versions.sh b/versions.sh index 1714741..6532c13 100755 --- a/versions.sh +++ b/versions.sh @@ -11,6 +11,19 @@ declare -A javaVersions=( [4.0]='11' [4.1]='11' ) +declare -A suiteOverrides=( + # see notes about python2 vs python3 in Dockerfile.template (noble does not have python2) + [3.0]='jammy' + [3.11]='jammy' + # https://issues.apache.org/jira/browse/CASSANDRA-19206: "cqlsh breaks with Python 3.12" ("ModuleNotFoundError: No module named 'six.moves'") + [4.0]='jammy' + [4.1]='jammy' + # "Warning: unsupported version of Python, required 3.6-3.11 but found 3.12" + # https://github.com/apache/cassandra/commit/8fd44ca8fc9e0b0e94932bcd855e2833bf6ca3cb#diff-8d8ae48aaf489a8a0e726d3e4a6230a26dcc76e7c739e8e3968e3f65c995d148 + # https://issues.apache.org/jira/browse/CASSANDRA-19245?focusedCommentId=17803539#comment-17803539 + # https://github.com/apache/cassandra/blob/cassandra-5.0-rc1/bin/cqlsh#L65 + [5.0]='jammy' +) cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" @@ -49,10 +62,11 @@ for version in "${versions[@]}"; do export fullVersion sha512 export javaVersion="${javaVersions[$version]:-$defaultJavaVersion}" + suiteOverride="${suiteOverrides[$version]:-}" # for the given Java version, find the "default" Eclipse Temurin tag with stable specificity ("X-jre-SUITE") from="$( - bashbrew --arch amd64 list --arch-filter "https://github.com/docker-library/official-images/raw/HEAD/library/eclipse-temurin:$javaVersion-jre" \ + bashbrew --arch amd64 list --arch-filter "https://github.com/docker-library/official-images/raw/HEAD/library/eclipse-temurin:$javaVersion-jre${suiteOverride:+-$suiteOverride}" \ | grep -F ":$javaVersion-jre-" \ | tail -1 )" From 72bda687322eef86992681e21ce54bd2351c2573 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 19 Aug 2024 07:24:25 -0700 Subject: [PATCH 199/223] Update 4.1 to 4.1.6 --- 4.1/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.1/Dockerfile b/4.1/Dockerfile index c3109f2..216586d 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.1.5 -ENV CASSANDRA_SHA512 9b76bcba188c34de0bec7327adb5d4d571df7ac485788e577974f361422c229df17d90925eff20d97090581c01756bc7a7fc8b8f01f99297c90276240e27ebeb +ENV CASSANDRA_VERSION 4.1.6 +ENV CASSANDRA_SHA512 3bae2a75aefc139ceaa9beb4709f9ee533517937ae292aba0102788cbf08f94f503c707124beaf06e28eca20dacf00a729da326c178bda432adfac2cd32b91c6 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index cd3d862..ef7825d 100644 --- a/versions.json +++ b/versions.json @@ -33,8 +33,8 @@ } }, "4.1": { - "version": "4.1.5", - "sha512": "9b76bcba188c34de0bec7327adb5d4d571df7ac485788e577974f361422c229df17d90925eff20d97090581c01756bc7a7fc8b8f01f99297c90276240e27ebeb", + "version": "4.1.6", + "sha512": "3bae2a75aefc139ceaa9beb4709f9ee533517937ae292aba0102788cbf08f94f503c707124beaf06e28eca20dacf00a729da326c178bda432adfac2cd32b91c6", "java": { "version": "11" }, From 31cced8ff8e1ba9f7d7600a8d0f41c36fb3dc8a8 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 26 Aug 2024 07:24:33 -0700 Subject: [PATCH 200/223] Update 5.0 to 5.0-rc2 --- 5.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.0/Dockerfile b/5.0/Dockerfile index 5a4a6ca..29575b8 100644 --- a/5.0/Dockerfile +++ b/5.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 5.0-rc1 -ENV CASSANDRA_SHA512 d964d937466876093c962f97735484644a1159dd4b39d8b03ff37a6c3265b063aacb434b76a8b06ffd34f821d78898b2d09dcf9cd02ce7d06d2b957f75ea24d6 +ENV CASSANDRA_VERSION 5.0-rc2 +ENV CASSANDRA_SHA512 04ed67d55256158f8283edc4cea6a8ab6accbc252bd62c78c3cb8480f8b81dd9f4ec2c1a8009a79b6206d1e3df21f6bf6e18a7d16e2dca7a4be4dafb7100dcde RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index ef7825d..673c1e9 100644 --- a/versions.json +++ b/versions.json @@ -44,8 +44,8 @@ } }, "5.0": { - "version": "5.0-rc1", - "sha512": "d964d937466876093c962f97735484644a1159dd4b39d8b03ff37a6c3265b063aacb434b76a8b06ffd34f821d78898b2d09dcf9cd02ce7d06d2b957f75ea24d6", + "version": "5.0-rc2", + "sha512": "04ed67d55256158f8283edc4cea6a8ab6accbc252bd62c78c3cb8480f8b81dd9f4ec2c1a8009a79b6206d1e3df21f6bf6e18a7d16e2dca7a4be4dafb7100dcde", "java": { "version": "17" }, From cb4f6acadef77048615282871fd1480aee75f193 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 5 Sep 2024 13:24:30 -0700 Subject: [PATCH 201/223] Update 5.0 to 5.0.0 --- 5.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.0/Dockerfile b/5.0/Dockerfile index 29575b8..a12b302 100644 --- a/5.0/Dockerfile +++ b/5.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 5.0-rc2 -ENV CASSANDRA_SHA512 04ed67d55256158f8283edc4cea6a8ab6accbc252bd62c78c3cb8480f8b81dd9f4ec2c1a8009a79b6206d1e3df21f6bf6e18a7d16e2dca7a4be4dafb7100dcde +ENV CASSANDRA_VERSION 5.0.0 +ENV CASSANDRA_SHA512 cf91d9a5fe370a3b7eab9447852c491de1c17aca5a71c5ff06a672d210f8d6500d973f2d1827250b071ab5e7d6d5d58c0e79dcef5b134913b4a610674d6ae7ed RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 673c1e9..f08e4d4 100644 --- a/versions.json +++ b/versions.json @@ -44,8 +44,8 @@ } }, "5.0": { - "version": "5.0-rc2", - "sha512": "04ed67d55256158f8283edc4cea6a8ab6accbc252bd62c78c3cb8480f8b81dd9f4ec2c1a8009a79b6206d1e3df21f6bf6e18a7d16e2dca7a4be4dafb7100dcde", + "version": "5.0.0", + "sha512": "cf91d9a5fe370a3b7eab9447852c491de1c17aca5a71c5ff06a672d210f8d6500d973f2d1827250b071ab5e7d6d5d58c0e79dcef5b134913b4a610674d6ae7ed", "java": { "version": "17" }, From 41fc6f77fbd75362dfcbeb21a32610c0eec61e28 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 5 Sep 2024 15:20:31 -0700 Subject: [PATCH 202/223] Move "latest" to 5.0 --- generate-stackbrew-library.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index a299120..035c138 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -3,8 +3,8 @@ set -eu declare -A aliases=( [3.11]='3' - [4.1]='4 latest' - [5.0]='5' + [4.1]='4' + [5.0]='5 latest' ) self="$(basename "$BASH_SOURCE")" From ef383f1d828a1d167b64d2575277f05654c5d903 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 26 Sep 2024 13:24:20 -0700 Subject: [PATCH 203/223] Update 4.0 to 4.0.14 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 7e072dc..ceb5688 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.13 -ENV CASSANDRA_SHA512 4172ef70aa4c51fb463c62019643c1d62c16f6c9a175ff4d9d1e869b234983a68694a4167946a3f70d4556f8c5f2494b809090e2cec3cb327956478028e95bf5 +ENV CASSANDRA_VERSION 4.0.14 +ENV CASSANDRA_SHA512 8f6adbbcd4e46a566c6f789a8d18c7478e5f2039a081a6f00c2c4c3ff9dc654fd38bb2f549157e554fc2f174347e47dd1b932cd4c7e71dcc07e58261b692a03e RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index f08e4d4..0021af0 100644 --- a/versions.json +++ b/versions.json @@ -22,8 +22,8 @@ } }, "4.0": { - "version": "4.0.13", - "sha512": "4172ef70aa4c51fb463c62019643c1d62c16f6c9a175ff4d9d1e869b234983a68694a4167946a3f70d4556f8c5f2494b809090e2cec3cb327956478028e95bf5", + "version": "4.0.14", + "sha512": "8f6adbbcd4e46a566c6f789a8d18c7478e5f2039a081a6f00c2c4c3ff9dc654fd38bb2f549157e554fc2f174347e47dd1b932cd4c7e71dcc07e58261b692a03e", "java": { "version": "11" }, From ad1d8a96d90bd17a5be305628aac3dafa9a11f5c Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 26 Sep 2024 19:24:27 -0700 Subject: [PATCH 204/223] Update 4.1 to 4.1.7 --- 4.1/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.1/Dockerfile b/4.1/Dockerfile index 216586d..68d6457 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.1.6 -ENV CASSANDRA_SHA512 3bae2a75aefc139ceaa9beb4709f9ee533517937ae292aba0102788cbf08f94f503c707124beaf06e28eca20dacf00a729da326c178bda432adfac2cd32b91c6 +ENV CASSANDRA_VERSION 4.1.7 +ENV CASSANDRA_SHA512 5c5aeaf5d9ee4aab2a901188cd66a6056e4f06c61a6a7c6645f5994484abf8942f7be9a51f638827649f918980ef510760a5a900fd8bdfe3b72c3e40bac1d3cb RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 0021af0..ed33212 100644 --- a/versions.json +++ b/versions.json @@ -33,8 +33,8 @@ } }, "4.1": { - "version": "4.1.6", - "sha512": "3bae2a75aefc139ceaa9beb4709f9ee533517937ae292aba0102788cbf08f94f503c707124beaf06e28eca20dacf00a729da326c178bda432adfac2cd32b91c6", + "version": "4.1.7", + "sha512": "5c5aeaf5d9ee4aab2a901188cd66a6056e4f06c61a6a7c6645f5994484abf8942f7be9a51f638827649f918980ef510760a5a900fd8bdfe3b72c3e40bac1d3cb", "java": { "version": "11" }, From 9c4cfca225a711f4523ef5134cc54c1a62e69eba Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 30 Sep 2024 07:24:29 -0700 Subject: [PATCH 205/223] Update 5.0 to 5.0.1 --- 5.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.0/Dockerfile b/5.0/Dockerfile index a12b302..dc8be2a 100644 --- a/5.0/Dockerfile +++ b/5.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 5.0.0 -ENV CASSANDRA_SHA512 cf91d9a5fe370a3b7eab9447852c491de1c17aca5a71c5ff06a672d210f8d6500d973f2d1827250b071ab5e7d6d5d58c0e79dcef5b134913b4a610674d6ae7ed +ENV CASSANDRA_VERSION 5.0.1 +ENV CASSANDRA_SHA512 0e1f56958c30cb34a2478856be3e9e97615be2aabe6f5d30e3c72f13e0866249f925312b32c8b28a8fdbe09a0a90ae45bdbd32709d6a7378951ad9e8b1c2e074 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index ed33212..cf4cc8c 100644 --- a/versions.json +++ b/versions.json @@ -44,8 +44,8 @@ } }, "5.0": { - "version": "5.0.0", - "sha512": "cf91d9a5fe370a3b7eab9447852c491de1c17aca5a71c5ff06a672d210f8d6500d973f2d1827250b071ab5e7d6d5d58c0e79dcef5b134913b4a610674d6ae7ed", + "version": "5.0.1", + "sha512": "0e1f56958c30cb34a2478856be3e9e97615be2aabe6f5d30e3c72f13e0866249f925312b32c8b28a8fdbe09a0a90ae45bdbd32709d6a7378951ad9e8b1c2e074", "java": { "version": "17" }, From 75187df9c5b4b5200e1c59fd46163f087d4f798a Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 30 Sep 2024 11:28:39 -0700 Subject: [PATCH 206/223] Update `generate-stackbrew-library.sh` to support `BASHBREW_LIBRARY` for easier cascading updates See https://github.com/docker-library/official-images/pull/17640#issuecomment-2380308790 --- generate-stackbrew-library.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 035c138..e84d666 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -42,17 +42,19 @@ dirCommit() { getArches() { local repo="$1"; shift - local officialImagesUrl='https://github.com/docker-library/official-images/raw/master/library/' + local officialImagesBase="${BASHBREW_LIBRARY:-https://github.com/docker-library/official-images/raw/HEAD/library}/" - eval "declare -g -A parentRepoToArches=( $( - find -name 'Dockerfile' -exec awk ' + local parentRepoToArchesStr + parentRepoToArchesStr="$( + find -name 'Dockerfile' -exec awk -v officialImagesBase="$officialImagesBase" ' toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|.*\/.*)(:|$)/ { - print "'"$officialImagesUrl"'" $2 + printf "%s%s\n", officialImagesBase, $2 } ' '{}' + \ | sort -u \ - | xargs bashbrew cat --format '[{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"' - ) )" + | xargs -r bashbrew cat --format '["{{ .RepoName }}:{{ .TagName }}"]="{{ join " " .TagEntry.Architectures }}"' + )" + eval "declare -g -A parentRepoToArches=( $parentRepoToArchesStr )" } getArches 'cassandra' From 1e3d5732f34ceb9e77870d0be9501515f917cc60 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Sat, 19 Oct 2024 07:24:30 -0700 Subject: [PATCH 207/223] Update 5.0 to 5.0.2 --- 5.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.0/Dockerfile b/5.0/Dockerfile index dc8be2a..7fe6e41 100644 --- a/5.0/Dockerfile +++ b/5.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 5.0.1 -ENV CASSANDRA_SHA512 0e1f56958c30cb34a2478856be3e9e97615be2aabe6f5d30e3c72f13e0866249f925312b32c8b28a8fdbe09a0a90ae45bdbd32709d6a7378951ad9e8b1c2e074 +ENV CASSANDRA_VERSION 5.0.2 +ENV CASSANDRA_SHA512 51478b18b8bce82a6b4915f31470d031306724041a4f2b684fd17635f8a5a9802594c0bbc3d0154cfa52d87a253d7868636985787aa1e3e00136259302689363 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index cf4cc8c..30bde2b 100644 --- a/versions.json +++ b/versions.json @@ -44,8 +44,8 @@ } }, "5.0": { - "version": "5.0.1", - "sha512": "0e1f56958c30cb34a2478856be3e9e97615be2aabe6f5d30e3c72f13e0866249f925312b32c8b28a8fdbe09a0a90ae45bdbd32709d6a7378951ad9e8b1c2e074", + "version": "5.0.2", + "sha512": "51478b18b8bce82a6b4915f31470d031306724041a4f2b684fd17635f8a5a9802594c0bbc3d0154cfa52d87a253d7868636985787aa1e3e00136259302689363", "java": { "version": "17" }, From c9c51a794db0a9fd4f1bd54e2f1bf75f98af571d Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 18 Nov 2024 07:24:20 -0800 Subject: [PATCH 208/223] Update 4.0 to 4.0.15 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index ceb5688..e5f6c8f 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.14 -ENV CASSANDRA_SHA512 8f6adbbcd4e46a566c6f789a8d18c7478e5f2039a081a6f00c2c4c3ff9dc654fd38bb2f549157e554fc2f174347e47dd1b932cd4c7e71dcc07e58261b692a03e +ENV CASSANDRA_VERSION 4.0.15 +ENV CASSANDRA_SHA512 9368639fe07613995fec2d50de13ba5b4a2d02e3da628daa1a3165aa009e356295d7f7aefde0dedaab385e9752755af8385679dd5f919902454df29114a3fcc0 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 30bde2b..f96ef49 100644 --- a/versions.json +++ b/versions.json @@ -22,8 +22,8 @@ } }, "4.0": { - "version": "4.0.14", - "sha512": "8f6adbbcd4e46a566c6f789a8d18c7478e5f2039a081a6f00c2c4c3ff9dc654fd38bb2f549157e554fc2f174347e47dd1b932cd4c7e71dcc07e58261b692a03e", + "version": "4.0.15", + "sha512": "9368639fe07613995fec2d50de13ba5b4a2d02e3da628daa1a3165aa009e356295d7f7aefde0dedaab385e9752755af8385679dd5f919902454df29114a3fcc0", "java": { "version": "11" }, From 297cb6862a1e4f6eb465648c66acc1ec05b8c0d7 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 21 Nov 2024 10:47:58 -0800 Subject: [PATCH 209/223] Update README See https://github.com/docker-library/docs/pull/2503 --- README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/README.md b/README.md index 8fcdf5f..697c62d 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,4 @@ For more information about the full official images change lifecycle, see [the " For outstanding `cassandra` image PRs, check [PRs with the "library/cassandra" label on the official-images repository](https://github.com/docker-library/official-images/labels/library%2Fcassandra). For the current "source of truth" for [`cassandra`](https://hub.docker.com/_/cassandra/), see [the `library/cassandra` file in the official-images repository](https://github.com/docker-library/official-images/blob/master/library/cassandra). ---- - -- [![build status badge](https://img.shields.io/github/actions/workflow/status/docker-library/cassandra/ci.yml?branch=master&label=GitHub%20CI)](https://github.com/docker-library/cassandra/actions?query=workflow%3A%22GitHub+CI%22+branch%3Amaster) -- [![build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/update.sh/job/cassandra.svg?label=Automated%20update.sh)](https://doi-janky.infosiftr.net/job/update.sh/job/cassandra/) - -| Build | Status | Badges | (per-arch) | -|:-:|:-:|:-:|:-:| -| [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/cassandra/) | [![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/cassandra.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/cassandra/) | [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/cassandra/) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/cassandra/) | -| [![s390x build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/s390x/job/cassandra.svg?label=s390x)](https://doi-janky.infosiftr.net/job/multiarch/job/s390x/job/cassandra/) | [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/cassandra.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/cassandra/) | - From 7085c9c97c8b95142a3bdba84300807de6eef13b Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 13 Dec 2024 15:02:49 -0800 Subject: [PATCH 210/223] Simplify and update `verify-templating.yml` This makes it print out a diff when there is an error (instead of just a list of files that are wrong), which will make the error more obvious. I also added `workflow_dispatch` so we can run it manually. --- .github/workflows/verify-templating.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/verify-templating.yml b/.github/workflows/verify-templating.yml index 2e1fb78..e822ba6 100644 --- a/.github/workflows/verify-templating.yml +++ b/.github/workflows/verify-templating.yml @@ -3,6 +3,7 @@ name: Verify Templating on: pull_request: push: + workflow_dispatch: defaults: run: @@ -14,9 +15,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Apply Templates - run: ./apply-templates.sh - - name: Check Git Status - run: | - status="$(git status --short)" - [ -z "$status" ] + - run: ./apply-templates.sh + - run: git diff --exit-code From e367aabb74d1249800e5cf94284183078d0a3a2c Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 3 Feb 2025 13:24:14 -0800 Subject: [PATCH 211/223] Update 3.0 to 3.0.31 --- 3.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 93540d2..6e3989f 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 3.0.30 -ENV CASSANDRA_SHA512 d239ae8c51ec9f3c789ed858e2daa8c3a6ee84ba8697c7e7e4037ac3c747451b91b894229aa68d6c829917afe68da408d403d5ac6c29c2d866f01e050b81f43f +ENV CASSANDRA_VERSION 3.0.31 +ENV CASSANDRA_SHA512 945a03647e1c041ad0686cd2f0774c828c2fe77d9c5595916c6c7e2b6ae07e40980b9157abed943fcba664103b172c378875ef7b35416590963d24602be44f3d RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index f96ef49..96e32ff 100644 --- a/versions.json +++ b/versions.json @@ -1,7 +1,7 @@ { "3.0": { - "version": "3.0.30", - "sha512": "d239ae8c51ec9f3c789ed858e2daa8c3a6ee84ba8697c7e7e4037ac3c747451b91b894229aa68d6c829917afe68da408d403d5ac6c29c2d866f01e050b81f43f", + "version": "3.0.31", + "sha512": "945a03647e1c041ad0686cd2f0774c828c2fe77d9c5595916c6c7e2b6ae07e40980b9157abed943fcba664103b172c378875ef7b35416590963d24602be44f3d", "java": { "version": "8" }, From 34424ed79ebd85603a14bda2a69d36a377bebbfc Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 3 Feb 2025 13:26:13 -0800 Subject: [PATCH 212/223] Update 3.11 to 3.11.18 --- 3.11/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 807bd00..0e26eae 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 3.11.17 -ENV CASSANDRA_SHA512 640d4d3d6800422b6dd4b8ff137065cc4ef08c55ff235556fb64d5de78f2c1e815618fbc9b14c1b94306cb58cd074ef729452657c7473aa194be9b34e9db481d +ENV CASSANDRA_VERSION 3.11.18 +ENV CASSANDRA_SHA512 2cd39818ec1a764bfdc69cd4c12b9afd80d15eb71303048ea7df181eb551c4daacb7e1f1d5dc20ee9efd65e5517df03af42761b17e82ce30ab9805a87ed31b2c RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 96e32ff..f31b0c1 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ } }, "3.11": { - "version": "3.11.17", - "sha512": "640d4d3d6800422b6dd4b8ff137065cc4ef08c55ff235556fb64d5de78f2c1e815618fbc9b14c1b94306cb58cd074ef729452657c7473aa194be9b34e9db481d", + "version": "3.11.18", + "sha512": "2cd39818ec1a764bfdc69cd4c12b9afd80d15eb71303048ea7df181eb551c4daacb7e1f1d5dc20ee9efd65e5517df03af42761b17e82ce30ab9805a87ed31b2c", "java": { "version": "8" }, From c4de505e25eb89ec5a0578dd693430bf3602b2e1 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 3 Feb 2025 19:24:23 -0800 Subject: [PATCH 213/223] Update 4.0 to 4.0.16 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index e5f6c8f..07505eb 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.15 -ENV CASSANDRA_SHA512 9368639fe07613995fec2d50de13ba5b4a2d02e3da628daa1a3165aa009e356295d7f7aefde0dedaab385e9752755af8385679dd5f919902454df29114a3fcc0 +ENV CASSANDRA_VERSION 4.0.16 +ENV CASSANDRA_SHA512 48f3464e25aabadb0d9c30fe5e30082dda9254d9c2336dbdd34d6b3803ea5340fd97d55e749db3a9e1098f1c6b23820024cab33c7aac5c803d1370f17f6dbf92 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index f31b0c1..89356bf 100644 --- a/versions.json +++ b/versions.json @@ -22,8 +22,8 @@ } }, "4.0": { - "version": "4.0.15", - "sha512": "9368639fe07613995fec2d50de13ba5b4a2d02e3da628daa1a3165aa009e356295d7f7aefde0dedaab385e9752755af8385679dd5f919902454df29114a3fcc0", + "version": "4.0.16", + "sha512": "48f3464e25aabadb0d9c30fe5e30082dda9254d9c2336dbdd34d6b3803ea5340fd97d55e749db3a9e1098f1c6b23820024cab33c7aac5c803d1370f17f6dbf92", "java": { "version": "11" }, From f49e80e172f29e2cad0a9acd054806d9709a4205 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 3 Feb 2025 19:26:34 -0800 Subject: [PATCH 214/223] Update 4.1 to 4.1.8 --- 4.1/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.1/Dockerfile b/4.1/Dockerfile index 68d6457..f65fc57 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.1.7 -ENV CASSANDRA_SHA512 5c5aeaf5d9ee4aab2a901188cd66a6056e4f06c61a6a7c6645f5994484abf8942f7be9a51f638827649f918980ef510760a5a900fd8bdfe3b72c3e40bac1d3cb +ENV CASSANDRA_VERSION 4.1.8 +ENV CASSANDRA_SHA512 13eee692627b5c88b2e6cda56e0aa1e5605403a777514f541496fa1985decb9b9417496984af9982060a874f1cb4d83789eb0fcb1ea549067df12388613550d8 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 89356bf..b2f6f15 100644 --- a/versions.json +++ b/versions.json @@ -33,8 +33,8 @@ } }, "4.1": { - "version": "4.1.7", - "sha512": "5c5aeaf5d9ee4aab2a901188cd66a6056e4f06c61a6a7c6645f5994484abf8942f7be9a51f638827649f918980ef510760a5a900fd8bdfe3b72c3e40bac1d3cb", + "version": "4.1.8", + "sha512": "13eee692627b5c88b2e6cda56e0aa1e5605403a777514f541496fa1985decb9b9417496984af9982060a874f1cb4d83789eb0fcb1ea549067df12388613550d8", "java": { "version": "11" }, From 105daf8445a12fc96ef48a1314566e0f61f473b2 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 3 Feb 2025 19:28:06 -0800 Subject: [PATCH 215/223] Update 5.0 to 5.0.3 --- 5.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.0/Dockerfile b/5.0/Dockerfile index 7fe6e41..da3149b 100644 --- a/5.0/Dockerfile +++ b/5.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 5.0.2 -ENV CASSANDRA_SHA512 51478b18b8bce82a6b4915f31470d031306724041a4f2b684fd17635f8a5a9802594c0bbc3d0154cfa52d87a253d7868636985787aa1e3e00136259302689363 +ENV CASSANDRA_VERSION 5.0.3 +ENV CASSANDRA_SHA512 9b2fa89f729a89473934a18d4056d200859bed6e4f9d288b9fca9e8f4056c2d1ccb128948996368395ccd8bb4d5c94b9d8c79c7603de2dcb5b15976ac8c6da8f RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index b2f6f15..3a70fa7 100644 --- a/versions.json +++ b/versions.json @@ -44,8 +44,8 @@ } }, "5.0": { - "version": "5.0.2", - "sha512": "51478b18b8bce82a6b4915f31470d031306724041a4f2b684fd17635f8a5a9802594c0bbc3d0154cfa52d87a253d7868636985787aa1e3e00136259302689363", + "version": "5.0.3", + "sha512": "9b2fa89f729a89473934a18d4056d200859bed6e4f9d288b9fca9e8f4056c2d1ccb128948996368395ccd8bb4d5c94b9d8c79c7603de2dcb5b15976ac8c6da8f", "java": { "version": "17" }, From d47ed59f99316e94a333126a10db20a440d4642d Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 7 Feb 2025 01:24:12 -0800 Subject: [PATCH 216/223] Update 3.0 to 3.0.32 --- 3.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.0/Dockerfile b/3.0/Dockerfile index 6e3989f..c96aa37 100644 --- a/3.0/Dockerfile +++ b/3.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 3.0.31 -ENV CASSANDRA_SHA512 945a03647e1c041ad0686cd2f0774c828c2fe77d9c5595916c6c7e2b6ae07e40980b9157abed943fcba664103b172c378875ef7b35416590963d24602be44f3d +ENV CASSANDRA_VERSION 3.0.32 +ENV CASSANDRA_SHA512 26043c329bc4c179bc50c2d7bd59e85292bfc8ed2af6502b636fe2fc583d32678649a69a2b0bdc6ff1f2798f7c4fd7fd84a7714d25c2e6172ab5cd1ae2d5d05c RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 3a70fa7..120a92e 100644 --- a/versions.json +++ b/versions.json @@ -1,7 +1,7 @@ { "3.0": { - "version": "3.0.31", - "sha512": "945a03647e1c041ad0686cd2f0774c828c2fe77d9c5595916c6c7e2b6ae07e40980b9157abed943fcba664103b172c378875ef7b35416590963d24602be44f3d", + "version": "3.0.32", + "sha512": "26043c329bc4c179bc50c2d7bd59e85292bfc8ed2af6502b636fe2fc583d32678649a69a2b0bdc6ff1f2798f7c4fd7fd84a7714d25c2e6172ab5cd1ae2d5d05c", "java": { "version": "8" }, From 011007d5b4f1b8e73835366ebb0a85ee89c29436 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 7 Feb 2025 01:26:08 -0800 Subject: [PATCH 217/223] Update 3.11 to 3.11.19 --- 3.11/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.11/Dockerfile b/3.11/Dockerfile index 0e26eae..15f8105 100644 --- a/3.11/Dockerfile +++ b/3.11/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 3.11.18 -ENV CASSANDRA_SHA512 2cd39818ec1a764bfdc69cd4c12b9afd80d15eb71303048ea7df181eb551c4daacb7e1f1d5dc20ee9efd65e5517df03af42761b17e82ce30ab9805a87ed31b2c +ENV CASSANDRA_VERSION 3.11.19 +ENV CASSANDRA_SHA512 42d7732c2b81c65a960101d1146603d430de341adcdf8d0ffc649753a340cf64dad696050f2ec01faff5f15e726f4f2a459f0b3ac281569b957f7726f51d43e0 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 120a92e..1949a96 100644 --- a/versions.json +++ b/versions.json @@ -11,8 +11,8 @@ } }, "3.11": { - "version": "3.11.18", - "sha512": "2cd39818ec1a764bfdc69cd4c12b9afd80d15eb71303048ea7df181eb551c4daacb7e1f1d5dc20ee9efd65e5517df03af42761b17e82ce30ab9805a87ed31b2c", + "version": "3.11.19", + "sha512": "42d7732c2b81c65a960101d1146603d430de341adcdf8d0ffc649753a340cf64dad696050f2ec01faff5f15e726f4f2a459f0b3ac281569b957f7726f51d43e0", "java": { "version": "8" }, From 8b58b84f373e48382e49d59acd0b544b33b2c034 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 7 Feb 2025 07:24:21 -0800 Subject: [PATCH 218/223] Update 4.0 to 4.0.17 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 07505eb..6639b6d 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.16 -ENV CASSANDRA_SHA512 48f3464e25aabadb0d9c30fe5e30082dda9254d9c2336dbdd34d6b3803ea5340fd97d55e749db3a9e1098f1c6b23820024cab33c7aac5c803d1370f17f6dbf92 +ENV CASSANDRA_VERSION 4.0.17 +ENV CASSANDRA_SHA512 7f72941dd1c73e30361cc2aad55dabd7005e95f2275c9190645fd0467cac6da67f8602ffbae53fb98367cb67116b4e271b8293381d7d5041267ce2437e8273be RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 1949a96..082f084 100644 --- a/versions.json +++ b/versions.json @@ -22,8 +22,8 @@ } }, "4.0": { - "version": "4.0.16", - "sha512": "48f3464e25aabadb0d9c30fe5e30082dda9254d9c2336dbdd34d6b3803ea5340fd97d55e749db3a9e1098f1c6b23820024cab33c7aac5c803d1370f17f6dbf92", + "version": "4.0.17", + "sha512": "7f72941dd1c73e30361cc2aad55dabd7005e95f2275c9190645fd0467cac6da67f8602ffbae53fb98367cb67116b4e271b8293381d7d5041267ce2437e8273be", "java": { "version": "11" }, From e760eeb35806501ba4a9bbdc5a8eca0a030df4ba Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 24 Mar 2025 16:33:28 -0700 Subject: [PATCH 219/223] Update shebang from /bin/bash to /usr/bin/env bash --- docker-entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 6549f83..f39af13 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e # first arg is `-f` or `--some-option` From 4acdd8cbbc6f21083e9b8176452a2728fa08f2c7 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 24 Mar 2025 16:38:01 -0700 Subject: [PATCH 220/223] Update shebang from /bin/bash to /usr/bin/env bash --- 3.0/docker-entrypoint.sh | 2 +- 3.11/docker-entrypoint.sh | 2 +- 4.0/docker-entrypoint.sh | 2 +- 4.1/docker-entrypoint.sh | 2 +- 5.0/docker-entrypoint.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/3.0/docker-entrypoint.sh b/3.0/docker-entrypoint.sh index 6549f83..f39af13 100755 --- a/3.0/docker-entrypoint.sh +++ b/3.0/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e # first arg is `-f` or `--some-option` diff --git a/3.11/docker-entrypoint.sh b/3.11/docker-entrypoint.sh index 6549f83..f39af13 100755 --- a/3.11/docker-entrypoint.sh +++ b/3.11/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e # first arg is `-f` or `--some-option` diff --git a/4.0/docker-entrypoint.sh b/4.0/docker-entrypoint.sh index 6549f83..f39af13 100755 --- a/4.0/docker-entrypoint.sh +++ b/4.0/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e # first arg is `-f` or `--some-option` diff --git a/4.1/docker-entrypoint.sh b/4.1/docker-entrypoint.sh index 6549f83..f39af13 100755 --- a/4.1/docker-entrypoint.sh +++ b/4.1/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e # first arg is `-f` or `--some-option` diff --git a/5.0/docker-entrypoint.sh b/5.0/docker-entrypoint.sh index 6549f83..f39af13 100755 --- a/5.0/docker-entrypoint.sh +++ b/5.0/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e # first arg is `-f` or `--some-option` From 0f32c04c976068ddf4b094044bd333ca46d42887 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 10 Apr 2025 13:24:29 -0700 Subject: [PATCH 221/223] Update 5.0 to 5.0.4 --- 5.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.0/Dockerfile b/5.0/Dockerfile index da3149b..ec95807 100644 --- a/5.0/Dockerfile +++ b/5.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 5.0.3 -ENV CASSANDRA_SHA512 9b2fa89f729a89473934a18d4056d200859bed6e4f9d288b9fca9e8f4056c2d1ccb128948996368395ccd8bb4d5c94b9d8c79c7603de2dcb5b15976ac8c6da8f +ENV CASSANDRA_VERSION 5.0.4 +ENV CASSANDRA_SHA512 16de8bb78af94dabfd916825f492de7040a7311791bc1d630f14707d88f7132e51ae38dad7ebbaf13d2d154af0bdeefe318d680798b8e247ae4117cbc0e2f6df RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 082f084..e9592af 100644 --- a/versions.json +++ b/versions.json @@ -44,8 +44,8 @@ } }, "5.0": { - "version": "5.0.3", - "sha512": "9b2fa89f729a89473934a18d4056d200859bed6e4f9d288b9fca9e8f4056c2d1ccb128948996368395ccd8bb4d5c94b9d8c79c7603de2dcb5b15976ac8c6da8f", + "version": "5.0.4", + "sha512": "16de8bb78af94dabfd916825f492de7040a7311791bc1d630f14707d88f7132e51ae38dad7ebbaf13d2d154af0bdeefe318d680798b8e247ae4117cbc0e2f6df", "java": { "version": "17" }, From 8b125f8e4cb082768e6d299130722ed3547e2206 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Mon, 19 May 2025 19:24:25 -0700 Subject: [PATCH 222/223] Update 4.1 to 4.1.9 --- 4.1/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.1/Dockerfile b/4.1/Dockerfile index f65fc57..287d5db 100644 --- a/4.1/Dockerfile +++ b/4.1/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.1.8 -ENV CASSANDRA_SHA512 13eee692627b5c88b2e6cda56e0aa1e5605403a777514f541496fa1985decb9b9417496984af9982060a874f1cb4d83789eb0fcb1ea549067df12388613550d8 +ENV CASSANDRA_VERSION 4.1.9 +ENV CASSANDRA_SHA512 ece9397a8d85a2dd7974932efca0a9b7a004850c34ecb0ec0fd4d30606a56dd7257a36b8bfb8b974ba154ab79887539eabaee8692cc8db606837848042104be7 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index e9592af..26e121c 100644 --- a/versions.json +++ b/versions.json @@ -33,8 +33,8 @@ } }, "4.1": { - "version": "4.1.8", - "sha512": "13eee692627b5c88b2e6cda56e0aa1e5605403a777514f541496fa1985decb9b9417496984af9982060a874f1cb4d83789eb0fcb1ea549067df12388613550d8", + "version": "4.1.9", + "sha512": "ece9397a8d85a2dd7974932efca0a9b7a004850c34ecb0ec0fd4d30606a56dd7257a36b8bfb8b974ba154ab79887539eabaee8692cc8db606837848042104be7", "java": { "version": "11" }, From b4b0579f68b8dfbffb61a438c8aaad14fccf44c4 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Thu, 29 May 2025 01:24:21 -0700 Subject: [PATCH 223/223] Update 4.0 to 4.0.18 --- 4.0/Dockerfile | 4 ++-- versions.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4.0/Dockerfile b/4.0/Dockerfile index 6639b6d..4e13900 100644 --- a/4.0/Dockerfile +++ b/4.0/Dockerfile @@ -90,8 +90,8 @@ ENV GPG_KEYS \ # Berenguer Blasi (Code Signing Key) CEC5C50B9C629EF0F5AB2706650B72EB14CCD622 -ENV CASSANDRA_VERSION 4.0.17 -ENV CASSANDRA_SHA512 7f72941dd1c73e30361cc2aad55dabd7005e95f2275c9190645fd0467cac6da67f8602ffbae53fb98367cb67116b4e271b8293381d7d5041267ce2437e8273be +ENV CASSANDRA_VERSION 4.0.18 +ENV CASSANDRA_SHA512 e9e4bb3149dce09b5f8dbe55d32892b147cdd13be7863851b0a1cb95113636e4433563e668759b49a8293c1cd766b331d27958f93331e9b3966951fc1c4681e6 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ diff --git a/versions.json b/versions.json index 26e121c..8e5e11e 100644 --- a/versions.json +++ b/versions.json @@ -22,8 +22,8 @@ } }, "4.0": { - "version": "4.0.17", - "sha512": "7f72941dd1c73e30361cc2aad55dabd7005e95f2275c9190645fd0467cac6da67f8602ffbae53fb98367cb67116b4e271b8293381d7d5041267ce2437e8273be", + "version": "4.0.18", + "sha512": "e9e4bb3149dce09b5f8dbe55d32892b147cdd13be7863851b0a1cb95113636e4433563e668759b49a8293c1cd766b331d27958f93331e9b3966951fc1c4681e6", "java": { "version": "11" },