From: tierno Date: Sat, 17 Nov 2018 00:01:52 +0000 (+0100) Subject: fixing Dockerfile.local X-Git-Tag: v5.0.0~7 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=f7e0a648a319dd744df5d650023eab774ebfcdbb;p=osm%2FLCM.git fixing Dockerfile.local Change-Id: I899e3407d7304e93148d32084dbfc926984c3071 Signed-off-by: tierno --- diff --git a/Dockerfile.local b/Dockerfile.local index dcef067..64036b8 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -16,25 +16,22 @@ FROM ubuntu:16.04 # Set the working directory to /app -WORKDIR /app/osm_lcm - -# Copy the current directory contents into the container at /app -ADD . /app # TODO move to the end +WORKDIR /app/LCM/osm_lcm RUN apt-get update && apt-get install -y git tox python3 \ python3-pip python3-aiohttp \ && pip3 install pip==9.0.3 \ && pip3 install -U 'PyYAML==3.*' 'aiohttp==0.20.2' flake8 -RUN git clone https://osm.etsi.org/gerrit/osm/N2VC.git \ - && pip3 install -e N2VC \ - && pip3 install -e N2VC/modules/libjuju \ +RUN git -C /app clone https://osm.etsi.org/gerrit/osm/N2VC.git \ + && pip3 install -e /app/N2VC \ + && pip3 install -e /app/N2VC/modules/libjuju \ && apt-get install -y libffi-dev libssl-dev openssh-client # cd N2VC; python3 setup.py develop # cd modules/libjuju; python3 setup.py develop -RUN git clone https://osm.etsi.org/gerrit/osm/common.git \ - && pip3 install -e common +RUN git -C /app clone https://osm.etsi.org/gerrit/osm/common.git \ + && pip3 install -e /app/common # python3-pymongo python3-yaml pycrypto aiokafka RUN mkdir -p /app/storage/kafka && mkdir -p /app/log @@ -63,11 +60,10 @@ ENV OSMLCM_VCA_SECRET: secret # database ENV OSMLCM_DATABASE_DRIVER mongo -ENV OSMLCM_DATABASE_HOST mongo -ENV OSMLCM_DATABASE_PORT 27017 +ENV OSMLCM_DATABASE_URI mongodb://mongo:27017 +# ENV OSMLCM_DATABASE_COMMONKEY xxx # ENV OSMLCM_DATABASE_USER xxx # ENV OSMLCM_DATABASE_PASSWORD xxx -# ENV OSMLCM_DATABASE_COMMONKEY xxx #storage ENV OSMLCM_STORAGE_DRIVER local @@ -79,14 +75,14 @@ ENV OSMLCM_MESSAGE_HOST kafka ENV OSMLCM_MESSAGE_PORT 9092 # logs -ENV OSMLCM_GLOBAL_LOGFILE /app/log/lcm.log +# ENV OSMLCM_GLOBAL_LOGFILE /app/log/lcm.log ENV OSMLCM_GLOBAL_LOGLEVEL DEBUG -# ADD . /app +# Copy the current directory contents into the container at /app/LCM +ADD . /app/LCM # Run app.py when the container launches CMD ["python3", "lcm.py"] # HEALTHCHECK --interval=30 --timeout=140 --retries=1 \ -# CMD python3 /usr/lib/python3/dist-packages/osm_lcm/lcm.py --health-check || exit 1 - +# CMD python3 lcm.py --health-check || exit 1