Skip to content
Snippets Groups Projects
Dockerfile 2.94 KiB
Newer Older
# syntax = docker/dockerfile:1.0-experimental
FROM ubuntu:18.04
Jaroslav Brazda's avatar
Jaroslav Brazda committed

# From https://github.com/jbrazda/ic-sagent-docker
Jaroslav Brazda's avatar
Jaroslav Brazda committed

LABEL maintainer="doit-integration-platform@office365.wisc.edu"

# POD and REGION can be inferred from the web URL of your Informatica Cloud site.
Eric Schoville's avatar
Eric Schoville committed
# The values for POD and REGION probably need changing for you.  Setting these as
# default for UW-Madison hosted service
Eric Schoville's avatar
Eric Schoville committed
ENV POD=$POD
ENV TZ=America/Chicago

# You should be able to download the Secure Agent binary from the following URL without authentication:

Jared Kosanovic's avatar
Jared Kosanovic committed
ARG AGENT_URL="https://${POD}.${REGION}.informaticacloud.com/saas/download/installer/linux64/agent64_install_ng_ext.bin"
Eric Schoville's avatar
Eric Schoville committed
ARG USER=agent
Jaroslav Brazda's avatar
Jaroslav Brazda committed

# install system tools
Eric Schoville's avatar
Eric Schoville committed
RUN apt-get update && apt-get install -y \
curl \
less \
locales \
locales-all \
sudo \
Eric Schoville's avatar
Eric Schoville committed
unzip \
RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime \
&& dpkg-reconfigure -f noninteractive tzdata

# Snowflake ODBC
RUN wget --no-directories --recursive --level=1 --no-parent --accept 'snowflake-odbc*.deb' https://sfc-repo.snowflakecomputing.com/odbc/linux/latest/index.html && \
dpkg -i --ignore-depends=unixodbc snowflake-odbc*.deb && \

# Set the locale, Locale defaults are necessary for agent to operate correctly
Eric Schoville's avatar
Eric Schoville committed
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# We need to run docker image under a different user than root
# Secure agent process engine can't be run under root account
Eric Schoville's avatar
Eric Schoville committed
RUN useradd --create-home -ms /bin/bash -U $USER
RUN mkdir /exports && chown $USER:$USER /exports
USER $USER
# Add the SQLite ODBC information.  The main odbcinst.ini is in INFA_HOME directory.
COPY --chown=agent odbcinst.ini /home/agent/.odbcinst.ini

# Create directories so that volume mounts pick up the correct users
RUN mkdir -p ~/databases && \
  mkdir -p ~/data && \
  mkdir -p $INFA_HOME/apps/Administrator/logs && \
  mkdir -p $INFA_HOME/apps/agentcore/logs && \
  mkdir -p $INFA_HOME/apps/CIHProcessor/logs && \
  mkdir -p $INFA_HOME/apps/Common_Integration_Components/logs && \
  mkdir -p $INFA_HOME/apps/Data_Integration_Server/logs && \
  mkdir -p $INFA_HOME/apps/FileIntegrationService/logs && \
  mkdir -p $INFA_HOME/apps/MassIngestionRuntime/logs && \
  mkdir -p $INFA_HOME/apps/OpsInsightsDataCollector/logs && \
  mkdir -p $INFA_HOME/apps/process-engine/logs && \
  mkdir -p $INFA_HOME/apps/Data_Integration_Server/ext/drivers && \
  mkdir -p $INFA_HOME/apps/agentcore/conf

# 1. Download and prepare Installer
# 2. Set file permissions
# 3. Install using silent install and the default location
# 4. Cleanup
RUN curl -o /tmp/agent64_install.bin $AGENT_URL && \
chmod +x /tmp/agent64_install.bin && \
/tmp/agent64_install.bin -i silent && \
rm -rf /tmp/agent64_install.bin

COPY run_agent.sh .
CMD [ "./run_agent.sh" ]