liboNet | 76cb159 | 2019-04-12 02:41:04 +0800 | [diff] [blame] | 1 | FROM alpine:3.9 |
| 2 | |
| 3 | ARG HTTP_PROXY=${HTTP_PROXY} |
| 4 | ARG HTTPS_PROXY=${HTTPS_PROXY} |
| 5 | ARG BUILD_VERSION=${BUILD_VERSION} |
| 6 | ARG ARTIFACT_LOGS=/var/log/onap |
| 7 | |
| 8 | ENV http_proxy $HTTP_PROXY |
| 9 | ENV https_proxy $HTTPS_PROXY |
| 10 | ENV BUILD_VERSION ${BUILD_VERSION} |
| 11 | ENV ARTIFACT_LOGS ${ARTIFACT_LOGS} |
| 12 | |
| 13 | ENV ARTIFACT_HOME=/opt/app/ |
| 14 | ENV ARTIFACT_DISTRIBUTION_HOME=${ARTIFACT_HOME}/distribution |
| 15 | |
| 16 | EXPOSE 9014 |
| 17 | |
| 18 | RUN apk add --no-cache --update busybox-extras bash nss procps coreutils findutils grep zip unzip \ |
| 19 | curl wget openssh openjdk8 maven jq httpie py-pip |
| 20 | |
| 21 | RUN addgroup -S onap && \ |
| 22 | adduser -S --shell /bin/bash -G onap onap |
| 23 | |
| 24 | RUN mkdir -p ${ARTIFACT_DISTRIBUTION_HOME} ${ARTIFACT_LOGS} ${ARTIFACT_HOME}/etc/ssl && \ |
| 25 | chown -R onap:onap ${ARTIFACT_HOME} ${ARTIFACT_DISTRIBUTION_HOME} ${ARTIFACT_LOGS} |
| 26 | |
| 27 | WORKDIR ${ARTIFACT_DISTRIBUTION_HOME} |
liboNet | 9bd3224 | 2019-05-24 03:19:25 +0800 | [diff] [blame] | 28 | RUN wget -O multicloud-framework-artifactbroker-package-1.3.3-SNAPSHOT.zip "https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.framework&a=multicloud-framework-artifactbroker-package&e=zip&v=1.3.3-SNAPSHOT" && \ |
| 29 | unzip -q -o -B multicloud-framework-artifactbroker-package-1.3.3-SNAPSHOT.zip && \ |
| 30 | rm -f multicloud-framework-artifactbroker-package-1.3.3-SNAPSHOT.zip |
liboNet | 76cb159 | 2019-04-12 02:41:04 +0800 | [diff] [blame] | 31 | COPY artifact-dist.sh bin/. |
| 32 | #RUN tar xvfz /packages/policy-distribution.tar.gz --directory ${ARTIFACT_DISTRIBUTION_HOME} |
| 33 | #RUN rm /packages/policy-distribution.tar.gz |
| 34 | |
| 35 | RUN chmod +x bin/*.sh && \ |
| 36 | cp ${ARTIFACT_DISTRIBUTION_HOME}/etc/ssl/* ${ARTIFACT_HOME}/etc/ssl && \ |
| 37 | chown onap:onap ${ARTIFACT_HOME}/etc/ssl/* |
| 38 | |
| 39 | USER onap |
| 40 | WORKDIR ${ARTIFACT_DISTRIBUTION_HOME}/bin |
| 41 | ENTRYPOINT [ "bash", "./artifact-dist.sh" ] |