ilanap | 820f4ec | 2019-11-18 13:38:23 +0200 | [diff] [blame] | 1 | FROM openjdk:8-jdk-alpine |
2 | |||||
3 | EXPOSE 8080 | ||||
4 | |||||
MichaelMorris | 1b548a3 | 2020-03-10 17:02:34 +0000 | [diff] [blame^] | 5 | USER root |
6 | RUN addgroup -g 1000 sdc && adduser -S -u 1000 -G sdc -s /bin/sh sdc | ||||
ilanap | 820f4ec | 2019-11-18 13:38:23 +0200 | [diff] [blame] | 7 | |
8 | ARG ARTIFACT | ||||
9 | |||||
MichaelMorris | 1b548a3 | 2020-03-10 17:02:34 +0000 | [diff] [blame^] | 10 | ADD --chown=sdc:sdc ${ARTIFACT} /app.jar |
ilanap | 820f4ec | 2019-11-18 13:38:23 +0200 | [diff] [blame] | 11 | |
MichaelMorris | 1b548a3 | 2020-03-10 17:02:34 +0000 | [diff] [blame^] | 12 | COPY --chown=sdc:sdc org.onap.sdc.p12 /keystore |
13 | COPY --chown=sdc:sdc org.onap.sdc.trust.jks /truststore | ||||
ilanap | 820f4ec | 2019-11-18 13:38:23 +0200 | [diff] [blame] | 14 | |
MichaelMorris | 1b548a3 | 2020-03-10 17:02:34 +0000 | [diff] [blame^] | 15 | COPY --chown=sdc:sdc startup.sh . |
ilanap | 820f4ec | 2019-11-18 13:38:23 +0200 | [diff] [blame] | 16 | RUN chmod 744 startup.sh |
MichaelMorris | 1b548a3 | 2020-03-10 17:02:34 +0000 | [diff] [blame^] | 17 | |
18 | RUN mkdir /var/log/ONAP/ | ||||
19 | RUN chown sdc:sdc /var/log/ONAP/ | ||||
ilanap | 820f4ec | 2019-11-18 13:38:23 +0200 | [diff] [blame] | 20 | |
MichaelMorris | 1b548a3 | 2020-03-10 17:02:34 +0000 | [diff] [blame^] | 21 | USER sdc |
22 | ENTRYPOINT [ "./startup.sh" ] |