Browse Source
While pbrx is nice and all, it's quite the divergence from how the rest of the container ecosystem works. Switch to using Dockerfile and the python-builder image. Bind mount ld.so.cache into bwrap context When using images based on the python:slim base image, python is installed in /usr/local and the linker needs to know to look in /usr/local/lib for shared libraries. Depends-On: https://review.openstack.org/632187 Change-Id: I84f6dd2a8e3222f7807103dcbb61bdadedfdd22dchanges/40/631840/16
5 changed files with 161 additions and 21 deletions
@ -0,0 +1,53 @@
|
||||
# Copyright (c) 2019 Red Hat, Inc. |
||||
# |
||||
# 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. |
||||
|
||||
FROM opendevorg/python-builder as builder |
||||
|
||||
COPY . /tmp/src |
||||
RUN /tmp/src/tools/install-js-tools.sh |
||||
RUN assemble |
||||
|
||||
FROM opendevorg/python-base as zuul-base |
||||
|
||||
COPY --from=builder /output/ /output |
||||
RUN echo "deb http://ftp.debian.org/debian stretch-backports main" >> /etc/apt/sources.list \ |
||||
&& apt-get update \ |
||||
&& apt-get install -t stretch-backports -y bubblewrap \ |
||||
&& apt-get clean \ |
||||
&& rm -rf /var/lib/apt/lists/* |
||||
RUN /output/install-from-bindep \ |
||||
&& pip install --cache-dir=/output/wheels -r /output/zuul_base/requirements.txt \ |
||||
&& rm -rf /output |
||||
|
||||
FROM zuul-base as zuul |
||||
CMD ["/usr/local/bin/zuul"] |
||||
|
||||
FROM zuul-base as zuul-executor |
||||
COPY --from=builder /output/ /output |
||||
RUN pip install --cache-dir=/output/wheels -r /output/zuul_executor/requirements.txt \ |
||||
&& rm -rf /output |
||||
CMD ["/usr/local/bin/zuul-executor"] |
||||
|
||||
FROM zuul-base as zuul-fingergw |
||||
CMD ["/usr/local/bin/zuul-fingergw"] |
||||
|
||||
FROM zuul-base as zuul-merger |
||||
CMD ["/usr/local/bin/zuul-merger"] |
||||
|
||||
FROM zuul-base as zuul-scheduler |
||||
CMD ["/usr/local/bin/zuul-scheduler"] |
||||
|
||||
FROM zuul-base as zuul-web |
||||
CMD ["/usr/local/bin/zuul-web"] |
Loading…
Reference in new issue