blob: 3be2717e94579a3faf66c15289f15ef660eb44de [file] [log] [blame]
Dan Timoney1de13612020-03-23 14:58:06 -04001# Prepare stage for multistage image build
2## START OF STAGE0 ##
3FROM ${base.image.name}:${project.docker.latestfulltag.version} AS stage0
4
5ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
Dan Timoneyca18ff32020-03-24 10:13:29 -04006ENV LOG_PATH /var/log/onap/ccsdk
Dan Timoney1de13612020-03-23 14:58:06 -04007
Dan Timoney1de13612020-03-23 14:58:06 -04008
9# copy deliverables to opt
10COPY opt /opt
Dan Timoneyca18ff32020-03-24 10:13:29 -040011
Dan Timoney1de13612020-03-23 14:58:06 -040012## END OF STAGE0 ##
13
14
15FROM ${base.image.name}:${project.docker.latestfulltag.version}
16
17MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org)
18
19ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
Dan Timoneyca18ff32020-03-24 10:13:29 -040020ENV CCSDK_HOME /opt/onap/ccsdk
21ENV SLIBOOT_JAR ${ccsdk.sliboot.jar}
22ENV SVCLOGIC_PROPERTIES /opt/onap/ccsdk/config/svclogic.properties
23ENV SVCLOGIC_DIR /opt/onap/ccsdk/svclogic/graphs
24ENV LOG_PATH /var/log/onap/ccsdk
Dan Timoney1de13612020-03-23 14:58:06 -040025
26# Install sudo and IP utilities
27RUN apk update && apk --no-cache add sudo iputils openssl
28
29
30# Enable wheel group
31RUN sed -e 's/# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/g' -i /etc/sudoers
32
Dan Timoneyca18ff32020-03-24 10:13:29 -040033# Create sli user
34RUN addgroup -S sli && adduser -S sli -G sli
35RUN addgroup sli wheel
Dan Timoney1de13612020-03-23 14:58:06 -040036
Dan Timoneyca18ff32020-03-24 10:13:29 -040037COPY --from=stage0 --chown=sli:sli /opt /opt
38RUN mkdir -p ${LOG_PATH} && chown sli:sli ${LOG_PATH}
39RUN chmod +x ${CCSDK_HOME}/bin/*.sh
Dan Timoney1de13612020-03-23 14:58:06 -040040
Dan Timoney1de13612020-03-23 14:58:06 -040041
Dan Timoneyca18ff32020-03-24 10:13:29 -040042USER sli
43WORKDIR ${CCSDK_HOME}
44ENTRYPOINT /opt/onap/ccsdk/bin/startSliboot.sh
45EXPOSE 8080