1 FROM @aai.docker.namespace@/aai-common-@aai.base.image@:@aai.base.image.version@
3 ARG MICRO_HOME=/opt/app/crud-api
4 ARG BIN_HOME=$MICRO_HOME/bin
5 ARG USERS_HOME=/opt/aaihome
7 # AAI-2177: Change aai gizmo container processes to run as non-root on the host
9 #Note:The group id and user id used below (492382 & 341790 respectively) are chosen arbitarily based on assumption that
10 # these are not used elsewhere. Please see https://jira.onap.org/browse/AAI-2172 for more background on this.
12 RUN mkdir -p $MICRO_HOME $USERS_HOME /logs \
13 && groupadd -g 492382 aaiadmin \
14 && useradd -r -u 341790 -g 492382 -ms /bin/sh -d $USERS_HOME/aaiadmin aaiadmin
17 RUN chmod 755 $BIN_HOME/* \
18 && ln -snf /logs $MICRO_HOME/logs \
19 && chown -R aaiadmin:aaiadmin $MICRO_HOME /logs
25 CMD ["/opt/app/crud-api/bin/start.sh"]