summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2019-01-18 16:03:46 +0000
committerMonty Taylor <mordred@inaugust.com>2019-01-24 16:11:31 +0000
commit7fe0e780cf4278feccd78290e7d6638e3ac4f79b (patch)
tree8739fa48b12f65155cf9c37d8985f57a714aeff6 /Dockerfile
parent8a38ee711f4253f4a8c02eefe0bcef26e0464d47 (diff)
downloadzuul-7fe0e780cf4278feccd78290e7d6638e3ac4f79b.tar.gz
Build zuul containers with dockerfile not pbrx
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: I84f6dd2a8e3222f7807103dcbb61bdadedfdd22d
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile53
1 files changed, 53 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 000000000..4031bf528
--- /dev/null
+++ b/Dockerfile
@@ -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"]