Skip to content

Commit b236b20

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request #45965 from pompomJuice/master
Automatic merge from submit-queue (batch tested with PRs 45852, 45965, 45941) Examples: fixed cassandra mirror detection that assumes an FTP site will always be presented **What this PR does / why we need it**: This fixes regressions in the cassandra example docker image creation scripts **Which issue this PR fixes** : #45882 **Special notes for your reviewer**: Pound that accept button, it will be fine. **Release note**: ``` Fixed the cassandra docker image cassandra mirror detection logic bumped cassandra to v3.10, as v3.9 is no longer on the mirrors bumped ubuntu-slim to v0.9 ```
2 parents f30bc1d + 42a4b6c commit b236b20

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

storage/cassandra/image/Dockerfile

+15-14
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM gcr.io/google_containers/ubuntu-slim:0.6
15+
FROM gcr.io/google_containers/ubuntu-slim:0.9
1616

1717
ARG BUILD_DATE
1818
ARG VCS_REF
@@ -42,12 +42,12 @@ ADD files /
4242

4343
RUN set -e && echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
4444
&& apt-get update && apt-get -qq -y --force-yes install --no-install-recommends \
45-
openjdk-8-jre-headless \
46-
libjemalloc1 \
47-
localepurge \
48-
wget && \
45+
openjdk-8-jre-headless \
46+
libjemalloc1 \
47+
localepurge \
48+
wget && \
4949
mirror_url=$( wget -q -O - http://www.apache.org/dyn/closer.cgi/cassandra/ \
50-
| sed -n 's#.*href="\(http://ftp.[^"]*\)".*#\1#p' \
50+
| sed -n 's#.*href="\(http://.*/cassandra\/[^"]*\)".*#\1#p' \
5151
| head -n 1 \
5252
) \
5353
&& wget -q -O - ${mirror_url}/${CASSANDRA_VERSION}/apache-cassandra-${CASSANDRA_VERSION}-bin.tar.gz \
@@ -64,7 +64,7 @@ RUN set -e && echo 'debconf debconf/frontend select Noninteractive' | debconf-se
6464
&& chown cassandra: /ready-probe.sh \
6565
&& if [ -n "$DEV_CONTAINER" ]; then apt-get -y --no-install-recommends install python; else rm -rf $CASSANDRA_HOME/pylib; fi \
6666
&& apt-get -y purge wget localepurge \
67-
&& apt-get autoremove \
67+
&& apt-get -y autoremove \
6868
&& apt-get clean \
6969
&& rm -rf \
7070
$CASSANDRA_HOME/*.txt \
@@ -73,12 +73,12 @@ RUN set -e && echo 'debconf debconf/frontend select Noninteractive' | debconf-se
7373
$CASSANDRA_HOME/tools/*.yaml \
7474
$CASSANDRA_HOME/tools/bin/*.bat \
7575
$CASSANDRA_HOME/bin/*.bat \
76-
doc \
77-
man \
78-
info \
79-
locale \
80-
common-licenses \
81-
~/.bashrc \
76+
doc \
77+
man \
78+
info \
79+
locale \
80+
common-licenses \
81+
~/.bashrc \
8282
/var/lib/apt/lists/* \
8383
/var/log/* \
8484
/var/cache/debconf/* \
@@ -116,7 +116,8 @@ RUN set -e && echo 'debconf debconf/frontend select Noninteractive' | debconf-se
116116
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/nashorn.jar \
117117
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/oblique-fonts \
118118
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/plugin.jar \
119-
/usr/lib/jvm/java-8-openjdk-amd64/man
119+
/usr/lib/jvm/java-8-openjdk-amd64/man
120+
120121

121122
VOLUME ["/$CASSANDRA_DATA"]
122123

storage/cassandra/image/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
VERSION=v12
1717
PROJECT_ID?=google_samples
1818
PROJECT=gcr.io/${PROJECT_ID}
19-
CASSANDRA_VERSION=3.9
19+
CASSANDRA_VERSION=3.10
2020

2121
all: kubernetes-cassandra.jar build
2222

@@ -26,6 +26,7 @@ kubernetes-cassandra.jar: ../java/* ../java/src/main/java/io/k8s/cassandra/*.jav
2626
cd ../java && mvn clean
2727

2828
container:
29+
@echo "Building ${PROJECT}/cassandra:${VERSION}"
2930
docker build --pull --build-arg "CASSANDRA_VERSION=${CASSANDRA_VERSION}" -t ${PROJECT}/cassandra:${VERSION} .
3031

3132
container-dev:
Binary file not shown.

0 commit comments

Comments
 (0)