3 # Set the version of the gosu command and if needs to be, it can be modified at runtime
6 # For building the image in a proxy environment if necessary
11 ENV HTTP_PROXY ${HTTP_PROXY}
12 ENV HTTPS_PROXY ${HTTPS_PROXY}
13 ENV http_proxy ${HTTP_PROXY}
14 ENV https_proxy ${HTTPS_PROXY}
15 ENV no_proxy 127.0.0.1,localhost,${no_proxy}
18 # Creates the group and user with the name aaiadmin for aai
19 #groupadd -r aaiadmin && useradd -r -g aaiadmin aaiadmin && \
20 # Put all the dependencies into this variable to easily install everything
21 DEPS="wget ca-certificates curl ksh git openjdk-8-jre-headless jq vim netcat uuid-runtime" && \
22 # Run the update before for the package manager to properly fetch install packages
24 # Install the recommended dependencies
25 apt-get install -y --no-install-recommends $DEPS && \
26 # Remove all the cache for the apt package manager
27 rm -rf /var/lib/apt/lists/* && \
28 # Get the dpkg to properly download and install that version compatible to install GOSU on the image
29 dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" && \
31 # Downloads the gosu command based on the dpkg version and gosu version supplied
32 wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
34 # Use GPG to install the gosu application locally
35 chmod +x /usr/local/bin/gosu