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
This commit is contained in:
Florian Haftmann 2023-02-28 14:54:35 +01:00
parent 9e9b76b991
commit 8c5bdbe569

View File

@ -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"]