summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2020-05-17 08:46:06 -0500
committerMonty Taylor <mordred@inaugust.com>2021-06-04 16:04:06 +0000
commita4dcc8bc4b7d2a9c8474ec7c27c9c7e20a361228 (patch)
treeba55a51cb69f20cb12d701dd324e106d3af32c66 /Dockerfile
parent85e69c8eb04b2e059e4deaa4805978f6c0665c03 (diff)
downloadzuul-a4dcc8bc4b7d2a9c8474ec7c27c9c7e20a361228.tar.gz
Use node image to build javascript
We can use more than one builder image. Use the node image for the javascript build so we can avoid spending time installing node in the python builder image. Change-Id: I19b18dd419b98119f75a8c3a9f3978f37f329e58
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile15
1 files changed, 7 insertions, 8 deletions
diff --git a/Dockerfile b/Dockerfile
index 2b1d1cdde..410a52c9a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,6 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+FROM docker.io/library/node:14-buster as js-builder
+
+COPY web /tmp/src
+# Explicitly run the Javascript build
+RUN cd /tmp/src && yarn install -d && yarn build
+
FROM docker.io/opendevorg/python-builder:3.8 as builder
ENV DEBIAN_FRONTEND=noninteractive
@@ -25,14 +31,7 @@ ARG OPENSHIFT_URL=https://github.com/openshift/origin/releases/download/v3.11.0/
ARG OPENSHIFT_SHA=4b0f07428ba854174c58d2e38287e5402964c9a9355f6c359d1242efd0990da3
COPY . /tmp/src
-RUN /tmp/src/tools/install-js-tools.sh
-# Explicitly run the Javascript build.
-RUN cd /tmp/src \
- && mkdir -p zuul/web/static \
- && ln -sfn ../zuul/web/static web/build \
- && cd /tmp/src/web \
- && yarn install -d \
- && yarn build
+COPY --from=js-builder /tmp/src/build /tmp/src/zuul/web/static
RUN assemble
# The wheel install method doesn't run the setup hooks as the source based