From 8c5bdbe569c57e7b9fb4d7f3eba932cb7f578ac4 Mon Sep 17 00:00:00 2001 From: Florian Haftmann Date: Tue, 28 Feb 2023 14:54:35 +0100 Subject: [PATCH] feat: Base installation independent of sources With the aim of incremental development builds, a mere change of the sources should not result in a re-download of a substantial amount of distribution packages, including a potential later re-upload into a container registry. Change-Id: Ica516f2a40ffaae9ddf4d7dd51d466e23456154f --- container/Dockerfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/container/Dockerfile b/container/Dockerfile index 5ff5b3a..36df3a1 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -14,22 +14,24 @@ LABEL skyline.build_branch=${GIT_BRANCH}\ ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8 -COPY ./ /skyline-apiserver/ -COPY ./container/start_service.sh /usr/local/bin/start_service.sh -COPY ./etc/skyline.yaml.sample /etc/skyline/skyline.yaml -COPY ./etc/gunicorn.py /etc/skyline/gunicorn.py - RUN apt-get update -y && apt-get install -y --no-install-recommends apt-utils \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \ gcc make nginx traceroute lsof iputils-ping vim git wget curl locales-all ssl-cert \ python3 python3-pip python3-dev python3-venv python-dev-is-python3 \ && mkdir -p /etc/skyline /var/log/skyline /var/lib/skyline \ - && git init /skyline-apiserver \ + && pip install -U ${SKYLINE_CONSOLE_PACKAGE_URL} + +COPY ./ /skyline-apiserver/ + +RUN git init /skyline-apiserver \ && pip install skyline-apiserver/ -chttps://releases.openstack.org/constraints/upper/master \ - && pip install -U ${SKYLINE_CONSOLE_PACKAGE_URL} \ && apt-get clean \ && rm -rf ~/.cache/pip +COPY ./etc/gunicorn.py /etc/skyline/gunicorn.py +COPY ./etc/skyline.yaml.sample /etc/skyline/skyline.yaml +COPY ./container/start_service.sh /usr/local/bin/start_service.sh + EXPOSE 443 CMD ["start_service.sh"]