#!/bin/bash

# Stop execution if any command fails (i.e. exits with status code > 0)
set -e

# Inject username with dynamic uid/gid
#echo "hnelson:x:$(id -u):$(id -g)::/home/hnelson:/bin/bash" >> /etc/passwd
#echo "hnelson:x:$(id -g):" >> /etc/group
export HOME=/home/hnelson

# Limit memory usage (requried for Java 8 which is not Docker aware)
export MAVEN_OPTS="-Xmx1024m"
export _JAVA_OPTIONS="-Xmx1024m"

exec "$@"
