From c4b85705284378bb180e72987d27953947ca19a7 Mon Sep 17 00:00:00 2001
From: Eric Schoville <eric.schoville@wisc.edu>
Date: Thu, 23 Jan 2020 10:21:43 -0600
Subject: [PATCH] create export dir

---
 Dockerfile | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index dbb4503..d0339c6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,13 +11,14 @@ MAINTAINER Eric Schoville <>
 
 ARG POD=usw3
 ARG REGION=dm-us
-ENV POD=$POD 
+ENV POD=$POD
 ENV REGION=$REGION
 
 # You should be able to download the Secure Agent binary from the following URL without authentication:
 
 ARG AGENT_URL="https://${POD}.${REGION}.informaticacloud.com/saas/download/linux64/installer/agent64_install_ng_ext.bin"
-ARG WORK_DIR=/home/agent/infaagent/apps/agentcore
+ARG USER=agent
+ARG WORK_DIR=/home/$USER/infaagent/apps/agentcore
 
 # install system tools
 RUN apt-get update && apt-get install -y \
@@ -30,16 +31,16 @@ unzip \
 jq
 
 # Set the locale, Locale defaults are necessary for agent to operate correctly
-RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
-locale-gen
+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
-RUN useradd --create-home -ms /bin/bash -U agent
-USER agent
+RUN useradd --create-home -ms /bin/bash -U $USER
+RUN mkdir /exports && chown $USER:$USER /exports
+USER $USER
 
 # 1. Download and prepare Installer
 # 2. Set file permissions
@@ -53,6 +54,7 @@ rm -rf /tmp/agent64_install.bin
 WORKDIR $WORK_DIR
 ## Define Volumes for Shared Data Staging area
 VOLUME [ "/data" ]
+VOLUME [ "/exports" ]
 ## Ports used by the agent that might be used for external Connections
 # 7080 Process Engine Shutdown Port
 # 7443 Process Engine https port
-- 
GitLab