From 43ac8a1de24f689a6dfba93e6b26b49e43f429d8 Mon Sep 17 00:00:00 2001 From: Gavin Morris Date: Tue, 31 Mar 2020 15:15:51 -0400 Subject: [PATCH 1/2] Added curl to apk dependencies --- 2.1.5/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/2.1.5/Dockerfile b/2.1.5/Dockerfile index b2c054d..ae9ebb9 100644 --- a/2.1.5/Dockerfile +++ b/2.1.5/Dockerfile @@ -19,6 +19,7 @@ USER root RUN apk add --no-cache openssl && \ apk add --no-cache bash && \ apk add --no-cache su-exec && \ + apk add --no-cache curl && \ wget -O ${JETTY_WEBAPPS}/${BLAZEGRAPH_NAME}.war $BLAZEGRAPH_VERSION_URL && \ chmod +x /var/lib/jetty/entrypoint.sh From 14f998594a43773a6d47da0c959c4c3c7a97fba2 Mon Sep 17 00:00:00 2001 From: Gavin Morris Date: Tue, 31 Mar 2020 15:38:10 -0400 Subject: [PATCH 2/2] Prototype code for review and testing. Didn't build image though --- 2.1.5/Dockerfile | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/2.1.5/Dockerfile b/2.1.5/Dockerfile index ae9ebb9..a529be6 100644 --- a/2.1.5/Dockerfile +++ b/2.1.5/Dockerfile @@ -1,4 +1,4 @@ -FROM jetty:9-jre8-alpine +FROM jetty:9-jre8 LABEL authors="mark.cooper@lyrasis.org,jonathan.green@lyrasis.org" @@ -16,10 +16,31 @@ ADD entrypoint.sh /var/lib/jetty/entrypoint.sh USER root -RUN apk add --no-cache openssl && \ - apk add --no-cache bash && \ - apk add --no-cache su-exec && \ - apk add --no-cache curl && \ +RUN DEPENDENCIES="openssl \ + curl \ + openssl" && \ + echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \ + apt-get update && \ + apt-get install -y --no-install-recommends $DEPENDENCIES && \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + # From https://gist.github.com/dmrub/b311d36492f230887ab0743b3af7309b + # Install latest su-exec + set -ex; \ + \ + curl -o /usr/local/bin/su-exec.c https://raw.githubusercontent.com/ncopa/su-exec/master/su-exec.c; \ + \ + fetch_deps='gcc libc-dev'; \ + apt-get update; \ + apt-get install -y --no-install-recommends $fetch_deps; \ + rm -rf /var/lib/apt/lists/*; \ + gcc -Wall \ + /usr/local/bin/su-exec.c -o/usr/local/bin/su-exec; \ + chown root:root /usr/local/bin/su-exec; \ + chmod 0755 /usr/local/bin/su-exec; \ + rm /usr/local/bin/su-exec.c; \ + \ + apt-get purge -y --auto-remove $fetch_deps wget -O ${JETTY_WEBAPPS}/${BLAZEGRAPH_NAME}.war $BLAZEGRAPH_VERSION_URL && \ chmod +x /var/lib/jetty/entrypoint.sh