Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 1 | # Large image |
| 2 | # FROM openjdk:8-jdk |
Christopher Lott (cl778h) | 6a4a349 | 2017-10-10 15:54:38 -0400 | [diff] [blame] | 3 | # Tiny image; it includes java and nc |
Sudarshan Kumar | 8e83c25 | 2020-02-18 16:16:26 +0530 | [diff] [blame] | 4 | #FROM frolvlad/alpine-oraclejdk8:slim |
| 5 | FROM openjdk:8-jdk-alpine |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 6 | |
| 7 | # Arguments are supplied by build script; |
| 8 | # the defaults below only support testing |
| 9 | ARG WMS_JAR=build/widget-ms.jar |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 10 | # Onejar |
| 11 | COPY ${WMS_JAR} /app.jar |
| 12 | RUN sh -c 'touch /app.jar' |
Christopher Lott (cl778h) | 6a4a349 | 2017-10-10 15:54:38 -0400 | [diff] [blame] | 13 | |
Christopher Lott (cl778h) | 6a4a349 | 2017-10-10 15:54:38 -0400 | [diff] [blame] | 14 | # Launch script |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 15 | COPY start-wms.sh / |
Christopher Lott (cl778h) | 6a4a349 | 2017-10-10 15:54:38 -0400 | [diff] [blame] | 16 | |
Pawel Wieczorek | fa08f47 | 2020-03-30 11:50:46 +0200 | [diff] [blame] | 17 | # Switch to unprivileged user |
Sudarshan Kumar | 8e83c25 | 2020-02-18 16:16:26 +0530 | [diff] [blame] | 18 | RUN addgroup -g 1000 -S portal && adduser -u 1000 -S portal -G portal && mkdir logs / && chown -R portal:portal /start-wms.sh /tmp /etc/ssl/certs/java /logs && chmod -R 755 /start-wms.sh /etc/ssl/certs/java /logs /tmp |
Pawel Wieczorek | fa08f47 | 2020-03-30 11:50:46 +0200 | [diff] [blame] | 19 | USER portal |
Sudarshan Kumar | 8e83c25 | 2020-02-18 16:16:26 +0530 | [diff] [blame] | 20 | |
Christopher Lott (cl778h) | 6a4a349 | 2017-10-10 15:54:38 -0400 | [diff] [blame] | 21 | # Define default command |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 22 | CMD /start-wms.sh |