blob: daa8e249520e2b00382400eded67ae35df217464 [file] [log] [blame]
liboNet76cb1592019-04-12 02:41:04 +08001FROM alpine:3.9
2
3ARG HTTP_PROXY=${HTTP_PROXY}
4ARG HTTPS_PROXY=${HTTPS_PROXY}
5ARG BUILD_VERSION=${BUILD_VERSION}
6ARG ARTIFACT_LOGS=/var/log/onap
7
8ENV http_proxy $HTTP_PROXY
9ENV https_proxy $HTTPS_PROXY
10ENV BUILD_VERSION ${BUILD_VERSION}
11ENV ARTIFACT_LOGS ${ARTIFACT_LOGS}
12
13ENV ARTIFACT_HOME=/opt/app/
14ENV ARTIFACT_DISTRIBUTION_HOME=${ARTIFACT_HOME}/distribution
15
16EXPOSE 9014
17
18RUN 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
21RUN addgroup -S onap && \
22 adduser -S --shell /bin/bash -G onap onap
23
24RUN mkdir -p ${ARTIFACT_DISTRIBUTION_HOME} ${ARTIFACT_LOGS} ${ARTIFACT_HOME}/etc/ssl && \
25 chown -R onap:onap ${ARTIFACT_HOME} ${ARTIFACT_DISTRIBUTION_HOME} ${ARTIFACT_LOGS}
26
27WORKDIR ${ARTIFACT_DISTRIBUTION_HOME}
liboNet9bd32242019-05-24 03:19:25 +080028RUN 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
liboNet76cb1592019-04-12 02:41:04 +080031COPY 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
35RUN chmod +x bin/*.sh && \
36 cp ${ARTIFACT_DISTRIBUTION_HOME}/etc/ssl/* ${ARTIFACT_HOME}/etc/ssl && \
37 chown onap:onap ${ARTIFACT_HOME}/etc/ssl/*
38
39USER onap
40WORKDIR ${ARTIFACT_DISTRIBUTION_HOME}/bin
41ENTRYPOINT [ "bash", "./artifact-dist.sh" ]