From 187f4c8c4aba15a4cd9dce3983b0d18740c125af Mon Sep 17 00:00:00 2001 From: Anton Parkhomenko Date: Thu, 13 Jun 2019 15:18:00 +0700 Subject: [PATCH] Add base-debian:0.2.0 image with JDK 11.0.3 (close #130) --- .travis.yml | 2 +- base-debian/0.2.0/Dockerfile | 45 ++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 base-debian/0.2.0/Dockerfile diff --git a/.travis.yml b/.travis.yml index ad0558b..8745209 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ script: env: matrix: - IMG=base-alpine/0.2.0 - - IMG=base-debian/0.1.0 + - IMG=base-debian/0.2.0 - IMG=scala-stream-collector/0.15.0/google-pubsub - IMG=scala-stream-collector/0.15.0/kafka - IMG=scala-stream-collector/0.15.0/kinesis diff --git a/base-debian/0.2.0/Dockerfile b/base-debian/0.2.0/Dockerfile new file mode 100644 index 0000000..0af5047 --- /dev/null +++ b/base-debian/0.2.0/Dockerfile @@ -0,0 +1,45 @@ +FROM openjdk:11.0.3-slim-stretch +LABEL maintainer="Snowplow Analytics Ltd. " + +# Snowplow components will be installed in this folder. +ENV SNOWPLOW_PATH="/snowplow" +ENV SNOWPLOW_CONFIG_PATH="${SNOWPLOW_PATH}/config" \ + SNOWPLOW_BIN_PATH="${SNOWPLOW_PATH}/bin" + +# Create a snowplow group and user. +RUN addgroup snowplow && \ + adduser --system --ingroup snowplow snowplow + +# Install the components common to all apps. +# https://github.com/yelp/dumb-init: lightweight init system +# https://github.com/tianon/gosu/: sudo replacement +RUN apt-get update && \ + apt-get install -y ca-certificates wget gnupg && \ + rm -rf /var/lib/apt/lists && \ + wget https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64.deb && \ + dpkg -i dumb-init_*.deb && \ + export GOSU_VERSION=1.10 && \ + wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" && \ + wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64.asc" && \ + export GNUPGHOME="$(mktemp -d)" && \ + for server in $(shuf -e ha.pool.sks-keyservers.net \ + hkp://p80.pool.sks-keyservers.net:80 \ + keyserver.ubuntu.com \ + hkp://keyserver.ubuntu.com:80 \ + pgp.mit.edu) ; do \ + gpg --batch --keyserver "$server" --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && break || : ; \ + done && \ + gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \ + gpgconf --kill all || : && \ + rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc && \ + chmod +x /usr/local/bin/gosu && \ + apt-get purge -y --auto-remove gnupg + +# /snowplow/bin is meant to contain the application jar. +# /snowplow/config is meant to contain the necessary configuration. +RUN mkdir -p ${SNOWPLOW_BIN_PATH} && \ + mkdir -p ${SNOWPLOW_CONFIG_PATH} && \ + chown -R snowplow:snowplow ${SNOWPLOW_PATH} + +# Expose the configuration directory. +VOLUME ${SNOWPLOW_CONFIG_PATH}