blob: 8f4b1072e1a3c2506f0cc21441a372a66dc5840f [file] [log] [blame]
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -04001# Large image
2# FROM openjdk:8-jdk
Christopher Lott (cl778h)6a4a3492017-10-10 15:54:38 -04003# Tiny image; it includes java and nc
Sudarshan Kumar8e83c252020-02-18 16:16:26 +05304#FROM frolvlad/alpine-oraclejdk8:slim
5FROM openjdk:8-jdk-alpine
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -04006
7# Arguments are supplied by build script;
8# the defaults below only support testing
9ARG WMS_JAR=build/widget-ms.jar
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040010# Onejar
11COPY ${WMS_JAR} /app.jar
12RUN sh -c 'touch /app.jar'
Christopher Lott (cl778h)6a4a3492017-10-10 15:54:38 -040013
Christopher Lott (cl778h)6a4a3492017-10-10 15:54:38 -040014# Launch script
st782s21a87612018-01-30 17:29:36 -050015COPY start-wms.sh /
Christopher Lott (cl778h)6a4a3492017-10-10 15:54:38 -040016
Pawel Wieczorekedebaff2020-03-30 11:50:46 +020017# Switch to unprivileged user
Sudarshan Kumar8e83c252020-02-18 16:16:26 +053018RUN 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 Wieczorekedebaff2020-03-30 11:50:46 +020019USER portal
Sudarshan Kumar8e83c252020-02-18 16:16:26 +053020
Christopher Lott (cl778h)6a4a3492017-10-10 15:54:38 -040021# Define default command
st782s21a87612018-01-30 17:29:36 -050022CMD /start-wms.sh