aboutsummaryrefslogtreecommitdiffstats
path: root/aai-resources/src/main/resources/docker/Dockerfile
blob: dcbae0c6f49d5f2f6720d7b5fc000049be505a4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM aaionap/aai-common:1.1.0

RUN mkdir -p /opt/aaihome/aaiadmin /opt/aai/logroot/AAI-RES /opt/app/aai-resources/bin /opt/app/aai-resources/extApps; 

# Add the proper files into the docker image from your build
ADD ./opt/app/aai-resources /opt/app/aai-resources
ADD ./commonLibs/           /opt/app/commonLibs/
ADD init-chef.sh 	    /opt/app/aai-resources/init-chef.sh
ADD docker-entrypoint.sh    /opt/app/aai-resources/docker-entrypoint.sh
ADD aai.sh 		    /etc/profile.d/aai.sh

# Change the permissions of aai shell script and all scripts in the microservice to be executable
RUN chmod 644 /etc/profile.d/aai.sh && \
	find /opt/app/aai-resources -name "*.sh" -exec chmod 755 {} + 

# Set the log directory to be mountable so the logs will be persisted
VOLUME /opt/aai/logroot/AAI-RES

# Expose the ports that needs to be available from the container
EXPOSE 8447

# During the startup of the container, this will be the starting directory
WORKDIR /opt/app/aai-resources

# When the container is started this is the entrypoint script
# that docker will run. Make sure this script doesn't end abruptly
# Docker entrypoint will run exec command to make that main process
# Using the exec form here will ensure the java process is main

ENTRYPOINT ["/bin/bash", "/opt/app/aai-resources/docker-entrypoint.sh"]