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

Commit

Permalink
Add Iglu Server to 0.4.0 image (closes #74)
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanunlu authored and BenFradet committed Sep 5, 2018
1 parent a6e7964 commit 01f39cb
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
- IMG=stream-enrich/0.19.0/nsq
- IMG=s3-loader/0.6.0
- IMG=elasticsearch-loader/0.10.2
- IMG=iglu-server/0.3.0
- IMG=iglu-server/0.4.0
- IMG=piinguin-server/0.1.1
global:
# BINTRAY_SNOWPLOW_DOCKER_USER
Expand Down
30 changes: 30 additions & 0 deletions iglu-server/0.4.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM snowplow-docker-registry.bintray.io/snowplow/base-debian:0.1.0
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# The version of the server to download
ENV IGLU_SERVER_VERSION="0.4.0"

# The name of the archive to download
ENV ARCHIVE="iglu_server_${IGLU_SERVER_VERSION}.zip"

# Install Iglu Server, postgresql client
RUN mkdir -p /tmp/build && \
cd /tmp/build && \
wget -q http://dl.bintray.com/snowplow/snowplow-generic/${ARCHIVE} && \
unzip -d ${SNOWPLOW_BIN_PATH} ${ARCHIVE} && \
cd /tmp && \
rm -rf /tmp/build && \
chown -R snowplow:snowplow ${SNOWPLOW_BIN_PATH} && \
apt-get update && \
# Workaround https://lists.debian.org/debian-user/2017/08/msg01557.html
mkdir -p /usr/share/man/man7 && \
apt-get install -y postgresql-client-9.6

EXPOSE 8080

# Defines an entrypoint script delegating the launching of the server to the snowplow user.
# The script uses dumb-init as the top-level process.
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT [ "docker-entrypoint.sh" ]

CMD [ "--help" ]
12 changes: 12 additions & 0 deletions iglu-server/0.4.0/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/dumb-init /bin/sh
set -e

# If the config directory has been mounted through -v, we chown it.
if [ "$(stat -c %u ${SNOWPLOW_CONFIG_PATH})" != "$(id -u snowplow)" ]; then
chown -R snowplow:snowplow ${SNOWPLOW_CONFIG_PATH}
fi

# Make sure we run the server as the snowplow user
exec gosu snowplow:snowplow /usr/bin/java \
$SP_JAVA_OPTS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap \
-jar ${SNOWPLOW_BIN_PATH}/iglu-server-${IGLU_SERVER_VERSION}.jar "$@"
3 changes: 2 additions & 1 deletion iglu-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This folder contains

* docker images of [Iglu Server](iglu-server)
* `0.3.0`
* `0.4.0`
* a docker compose example to run [Iglu Server](iglu-server) with [Postgres](https://github.com/docker-library/postgres)

## Introduction
Expand Down Expand Up @@ -36,7 +37,7 @@ Additional JVM options can be set through the `SP_JAVA_OPTS` environment variabl
3) Build image

```
$ VERSION=0.3.0
$ VERSION=0.4.0
$ docker build -t iglu-server:${VERSION} $VERSION
```
Expand Down
2 changes: 1 addition & 1 deletion iglu-server/example/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
max-size: 1G
iglu-server:
container_name: iglu-server
image: snowplow-docker-registry.bintray.io/snowplow/iglu-server:0.3.0
image: snowplow-docker-registry.bintray.io/snowplow/iglu-server:0.4.0
entrypoint: /usr/local/bin/wait-for-postgres.sh postgres --config /snowplow/config/application.conf
depends_on:
- postgres
Expand Down

0 comments on commit 01f39cb

Please sign in to comment.