X-Git-Url: https://gerrit.onap.org/r/gitweb?p=ccsdk%2Fdistribution.git;a=blobdiff_plain;f=opendaylight%2Ffluorine%2Ffluorine-alpine%2Fsrc%2Fmain%2Fdocker%2FDockerfile;fp=opendaylight%2Ffluorine%2Ffluorine-alpine%2Fsrc%2Fmain%2Fdocker%2FDockerfile;h=b5e91b92e0ad4dba9fb4c09f15a24521439a2918;hp=a043e1e9eafdf9e76da255208e422f08771bfcd0;hb=c6f21bed9c8144d5195232d28dfd1d1f9f1373e6;hpb=85f914068748d4446b64893b06f7a3abe6cddd6d diff --git a/opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile b/opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile index a043e1e9..b5e91b92 100644 --- a/opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile +++ b/opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile @@ -1,18 +1,29 @@ -# Base ubuntu with added packages needed for open ecomp +# Prepare stage for multistage image build +## START OF STAGE0 ## +FROM onap/ccsdk-alpine-image:${project.docker.latestfulltag.version} AS stage0 + +# Add the opendaylight's karaf and expand +ADD karaf-${ccsdk.opendaylight.version}.tar.gz /opt/odl +RUN mv /opt/odl/karaf-${ccsdk.opendaylight.version} /opt/opendaylight \ + && ln -s /opt/opendaylight /opt/opendaylight/karaf-${ccsdk.opendaylight.version} \ + && ln -s /opt/opendaylight /opt/opendaylight/current \ + && rmdir /opt/odl +## END OF STAGE0 ## + + FROM onap/ccsdk-alpine-image:${project.docker.latestfulltag.version} + MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org) + ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk ENV ODL_HOME /opt/opendaylight/current -# copy the opendaylight tar and expand -COPY karaf-${ccsdk.opendaylight.version}.tar.gz /tmp/ -RUN mkdir -p /opt/odl \ - && tar zxvf /tmp/karaf-${ccsdk.opendaylight.version}.tar.gz --directory /opt/odl \ - && rm -rf /tmp/karaf-${ccsdk.opendaylight.version}.tar.gz \ - && mv /opt/odl/karaf-${ccsdk.opendaylight.version} /opt/opendaylight \ - && ln -s /opt/opendaylight /opt/opendaylight/karaf-${ccsdk.opendaylight.version} \ - && ln -s /opt/opendaylight /opt/opendaylight/current - +# Create odl user +RUN addgroup -S odl +RUN adduser -S odl -G odl +RUN addgroup odl wheel + +COPY --from=stage0 --chown=odl:odl /opt /opt # workaround till we get proxy working RUN mkdir -p /opt/opendaylight/system/org/mariadb/jdbc/mariadb-java-client/${ccsdk.mariadb-connector-java.version}