blob: 36287743b5443b7d23bfd3d659b9b71e6c194935 [file] [log] [blame]
Daniel Espenbe80b3c2020-02-10 08:43:47 +01001# 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 Espenbe80b3c2020-02-10 08:43:47 +01009
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"