Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
Bump base images of base images (close #144)
Browse files Browse the repository at this point in the history
  • Loading branch information
dadasami authored and oguzhanunlu committed Sep 18, 2020
1 parent 68fc43d commit 54eb31e
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 18 deletions.
21 changes: 14 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ script:
- cd ${TRAVIS_BUILD_DIR}
env:
matrix:
- IMG=base-alpine/0.2.0
- IMG=base-debian/0.2.0
- IMG=base-alpine/0.2.1
- IMG=base-debian/0.1.1
- IMG=base-debian/0.2.1
- IMG=piinguin-server/0.1.1
- IMG=emr-etl-runner/r114_polonnaruwa
- IMG=k8s-dataflow/0.2.0
Expand All @@ -25,28 +26,34 @@ deploy:
skip_cleanup: true
on:
tags: true
condition: '"$(.travis/is_release_tag.sh base-alpine $TRAVIS_TAG)" == "" && $? == 0 && $IMG = base-alpine/0.2.0'
condition: '"$(.travis/is_release_tag.sh base-alpine/0.2.1 $TRAVIS_TAG)" == "" && $? == 0 && $IMG = base-alpine/0.2.1'
- provider: script
script: ./.travis/deploy.sh base-debian $TRAVIS_TAG
skip_cleanup: true
on:
tags: true
condition: '"$(.travis/is_release_tag.sh base-debian $TRAVIS_TAG)" == "" && $? == 0 && $IMG = base-debian/0.2.0'
condition: '"$(.travis/is_release_tag.sh base-debian/0.1.1 $TRAVIS_TAG)" == "" && $? == 0 && $IMG = base-debian/0.1.1'
- provider: script
script: ./.travis/deploy.sh base-debian $TRAVIS_TAG
skip_cleanup: true
on:
tags: true
condition: '"$(.travis/is_release_tag.sh base-debian/0.2.1 $TRAVIS_TAG)" == "" && $? == 0 && $IMG = base-debian/0.2.1'
- provider: script
script: ./.travis/deploy.sh piinguin-server $TRAVIS_TAG
skip_cleanup: true
on:
tags: true
condition: '"$(.travis/is_release_tag.sh piinguin-server $TRAVIS_TAG)" == "" && $? == 0 && $IMG = piinguin-server/0.1.1'
condition: '"$(.travis/is_release_tag.sh piinguin-server/0.1.1 $TRAVIS_TAG)" == "" && $? == 0 && $IMG = piinguin-server/0.1.1'
- provider: script
script: ./.travis/deploy.sh emr-etl-runner $TRAVIS_TAG
skip_cleanup: true
on:
tags: true
condition: '"$(.travis/is_release_tag.sh emr-etl-runner $TRAVIS_TAG)" == "" && $? == 0 && $IMG = emr-etl-runner/r114_polonnaruwa'
condition: '"$(.travis/is_release_tag.sh emr-etl-runner/r114_polonnaruwa $TRAVIS_TAG)" == "" && $? == 0 && $IMG = emr-etl-runner/r114_polonnaruwa'
- provider: script
script: ./.travis/deploy.sh k8s-dataflow $TRAVIS_TAG
skip_cleanup: true
on:
tags: true
condition: '"$(.travis/is_release_tag.sh k8s-dataflow $TRAVIS_TAG)" == "" && $? == 0 && $IMG = k8s-dataflow/0.2.0'
condition: '"$(.travis/is_release_tag.sh k8s-dataflow/0.2.0 $TRAVIS_TAG)" == "" && $? == 0 && $IMG = k8s-dataflow/0.2.0'
13 changes: 2 additions & 11 deletions .travis/is_release_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,8 @@
project=$1
tag=$2

slashed="${project}/"
slashed_len=${#slashed}

cicd=${tag:0:${slashed_len}}
release=${tag:${slashed_len}}

if [ "${cicd}" == "${slashed}" ]; then
if [ "${release}" == "" ]; then
echo "Warning! No release specified! Ignoring."
exit 2
fi
if [ "${project}" == "${tag}" ]; then
exit 0
else
exit 1
fi
25 changes: 25 additions & 0 deletions base-alpine/0.2.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM openjdk:8u212-jre-alpine
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# 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 -S -G snowplow snowplow

# Install the components common to all apps.
# https://github.com/yelp/dumb-init: lightweight init system
# https://github.com/ncopa/su-exec: sudo replacement
RUN apk add --no-cache dumb-init su-exec ca-certificates wget

# /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}
45 changes: 45 additions & 0 deletions base-debian/0.1.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM openjdk:8u265-jre-slim
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# 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.2/dumb-init_1.2.2_amd64.deb && \
dpkg -i dumb-init_*.deb && \
export GOSU_VERSION=1.12 && \
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}
45 changes: 45 additions & 0 deletions base-debian/0.2.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM openjdk:11.0.8-slim-buster
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# 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.2/dumb-init_1.2.2_amd64.deb && \
dpkg -i dumb-init_*.deb && \
export GOSU_VERSION=1.12 && \
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}

0 comments on commit 54eb31e

Please sign in to comment.