blob: 36287743b5443b7d23bfd3d659b9b71e6c194935 [file] [log] [blame]
Daniel Espen5ead0f52020-06-08 13:44:31 +02001# Add java runtime environment for execution
2FROM java:8-jdk-alpine
3
4# Copy built jar to image using the jar name specified in the pom.xml (JAR_FILE)
5ARG JAR_FILE
6COPY target/${JAR_FILE} /usr/share/basyxExecutable.jar
7COPY target/lib /usr/share/lib
Constantin Ziesche02817f12020-08-04 21:40:43 +02008COPY src/main/resources/context.properties /usr/share/context.properties
Daniel Espen5ead0f52020-06-08 13:44:31 +02009
10# Expose the appropriate port. In case of Tomcat, this is 8080.
11ARG PORT
12EXPOSE ${PORT}
13
14# Start the jar
Constantin Ziesche02817f12020-08-04 21:40:43 +020015CMD java -jar "/usr/share/basyxExecutable.jar" "/usr/share/context.properties"