7f5f0bd4df
Some spring cleaning now that bullseye is available. While we are at it we fix up the job requires and provides for the related image building and service testing jobs too. Change-Id: I8a392e06df66b2e0c85157e61e529bb649d8ad58
59 lines
2.5 KiB
Docker
59 lines
2.5 KiB
Docker
# Copyright (c) 2020 OpenStack Foundation
|
|
#
|
|
# 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.
|
|
|
|
# upload trigger - Mon 26 Oct 2021 06:00 PM UTC
|
|
# refstack commit - bb0e985734690394e227d16af893b8e4ac8d3724
|
|
|
|
FROM opendevorg/python-builder:3.8-bullseye as builder
|
|
|
|
RUN apt-get update \
|
|
&& apt-get -y install git apt-utils python3-dev dh-python libc-dev-bin \
|
|
libc6-dev libexpat1-dev libpython3-dev libpython3-dev linux-libc-dev \
|
|
apt-transport-https curl gnupg2 \
|
|
&& curl -sS https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
|
|
&& echo "deb https://deb.nodesource.com/node_16.x bullseye main" | tee /etc/apt/sources.list.d/nodesource.list \
|
|
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
|
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
|
|
&& apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get -q --option "Dpkg::Options::=--force-confold" --assume-yes install nodejs yarn \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN git clone https://opendev.org/openinfra/refstack /tmp/src
|
|
|
|
RUN assemble
|
|
|
|
RUN cd /tmp/src && yarn install
|
|
|
|
# Refstack's docs are built and then hosted by refstack UI
|
|
RUN python -m venv /tmp/venv \
|
|
&& /tmp/venv/bin/pip install beautifulsoup4 docutils \
|
|
&& /tmp/venv/bin/python /tmp/src/tools/convert-docs.py -o /tmp/src/refstack-ui/app/components/about/templates /tmp/src/doc/source/*.rst \
|
|
&& rm -rf /tmp/venv
|
|
|
|
FROM opendevorg/python-base:3.8-bullseye as refstack
|
|
|
|
COPY --from=builder /output/ /output
|
|
COPY --from=builder /tmp/src/refstack-ui/app/ /refstack-ui/app
|
|
COPY ./entrypoint.sh /usr/bin/entrypoint
|
|
# TODO this should be fixed probably through proper js packaging
|
|
RUN rm /refstack-ui/app/assets/lib
|
|
COPY --from=builder /tmp/src/node_modules/@bower_components/ /refstack-ui/app/assets/lib
|
|
RUN /output/install-from-bindep \
|
|
&& rm -rf /output
|
|
|
|
ENTRYPOINT ["/usr/bin/entrypoint"]
|
|
CMD ["pecan", "serve", "/usr/local/lib/python3.8/site-packages/refstack/api/config.py"]
|