Skip to content
Snippets Groups Projects
Commit fa6cbc17 authored by sousaedu's avatar sousaedu
Browse files

Fix bug 1617 - adding start script to LCM to install CA certificates


Change-Id: I900b8e7db66924e8f12dbc6ce3b9a10cbc14f160
Signed-off-by: default avatarsousaedu <eduardo.sousa@canonical.com>
parent 31f39903
No related branches found
No related tags found
No related merge requests found
......@@ -70,8 +70,7 @@ FROM ubuntu:18.04
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install python3-minimal=3.6.7-1~18.04
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes install \
ca-certificates
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes install ca-certificates
COPY --from=INSTALL /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages
COPY --from=INSTALL /usr/local/lib/python3.6/dist-packages /usr/local/lib/python3.6/dist-packages
......@@ -85,6 +84,8 @@ COPY --from=INSTALL /usr/bin/ssh /usr/bin/ssh
COPY --from=INSTALL /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/
COPY --from=INSTALL /lib/x86_64-linux-gnu/ /lib/x86_64-linux-gnu/
COPY scripts/ scripts/
########################################################################
# Used for local storage
......@@ -129,6 +130,7 @@ ENV OSMLCM_VCA_JUJUPATH /usr/local/bin/juju
# helm
ENV OSMLCM_VCA_STABLEREPOURL https://charts.helm.sh/stable
# ENV OSMLCM_VCA_HELM_CA_CERTS <ca-cert>
# logs
# ENV OSMLCM_GLOBAL_LOGFILE /app/log/lcm.log
......@@ -139,5 +141,5 @@ HEALTHCHECK --start-period=120s --interval=30s --timeout=30s --retries=1 \
# Run app.py when the container launches
CMD python3 -m osm_lcm.lcm
CMD [ "/bin/bash", "scripts/start.sh" ]
#!/bin/bash
###############################################################################
# Copyright 2021 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
if [ "$OSMLCM_VCA_HELM_CA_CERTS" ]; then
echo "$OSMLCM_VCA_HELM_CA_CERTS" >> /etc/ssl/certs/ca-certificates.crt
fi
python3 -m osm_lcm.lcm
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment