From 9c8069d26a7e6d99a842531bbba9c5563b10f88e Mon Sep 17 00:00:00 2001 From: Phil Sphicas Date: Wed, 9 Sep 2020 02:26:07 +0000 Subject: [PATCH] Include LibYAML in container builds Updates Dockerfiles to build the LibYAML library, which can provide much faster YAML parsing and emitting than the native Python library. https://pyyaml.org/wiki/LibYAML Change-Id: I1c6f41a72c7d32e810cf64f572dc2a1cc6a1e710 --- images/deckhand/Dockerfile.opensuse_15 | 17 +++++++++++++++++ images/deckhand/Dockerfile.ubuntu_bionic | 17 +++++++++++++++++ images/deckhand/Dockerfile.ubuntu_xenial | 17 +++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/images/deckhand/Dockerfile.opensuse_15 b/images/deckhand/Dockerfile.opensuse_15 index b74811ca..a74802af 100644 --- a/images/deckhand/Dockerfile.opensuse_15 +++ b/images/deckhand/Dockerfile.opensuse_15 @@ -31,6 +31,7 @@ EXPOSE $PORT RUN set -x && \ zypper -q update -y && \ zypper install -y --no-recommends \ + automake \ ca-certificates \ curl \ gcc \ @@ -39,6 +40,7 @@ RUN set -x && \ libffi-devel \ libopenssl-devel \ libpqxx-devel \ + libtool \ make \ netcat-openbsd \ netcfg \ @@ -61,6 +63,21 @@ RUN pip3 install -U pip \ /usr/share/doc \ /usr/share/doc-base +# Install LibYAML +ENV LD_LIBRARY_PATH=/usr/local/lib + +ARG LIBYAML_VERSION=0.2.5 +RUN set -ex \ + && git clone https://github.com/yaml/libyaml.git \ + && cd libyaml \ + && git checkout $LIBYAML_VERSION \ + && ./bootstrap \ + && ./configure \ + && make \ + && make install \ + && cd .. \ + && rm -fr libyaml + # Create deckhand user RUN useradd -ms /bin/bash deckhand diff --git a/images/deckhand/Dockerfile.ubuntu_bionic b/images/deckhand/Dockerfile.ubuntu_bionic index c79d629d..62b6a91c 100644 --- a/images/deckhand/Dockerfile.ubuntu_bionic +++ b/images/deckhand/Dockerfile.ubuntu_bionic @@ -32,6 +32,7 @@ EXPOSE $PORT RUN set -x && \ apt-get -qq update && \ apt-get -y install \ + automake \ ca-certificates \ curl \ g++ \ @@ -40,6 +41,7 @@ RUN set -x && \ libffi-dev \ libpq-dev \ libssl-dev \ + libtool \ make \ netbase \ netcat \ @@ -59,6 +61,21 @@ RUN set -x && \ /usr/share/doc \ /usr/share/doc-base +# Install LibYAML +ENV LD_LIBRARY_PATH=/usr/local/lib + +ARG LIBYAML_VERSION=0.2.5 +RUN set -ex \ + && git clone https://github.com/yaml/libyaml.git \ + && cd libyaml \ + && git checkout $LIBYAML_VERSION \ + && ./bootstrap \ + && ./configure \ + && make \ + && make install \ + && cd .. \ + && rm -fr libyaml + # Create deckhand user RUN useradd -ms /bin/bash deckhand diff --git a/images/deckhand/Dockerfile.ubuntu_xenial b/images/deckhand/Dockerfile.ubuntu_xenial index 04e7e375..3cdbe7f6 100644 --- a/images/deckhand/Dockerfile.ubuntu_xenial +++ b/images/deckhand/Dockerfile.ubuntu_xenial @@ -32,6 +32,7 @@ EXPOSE $PORT RUN set -x && \ apt-get -qq update && \ apt-get -y install \ + automake \ ca-certificates \ curl \ g++ \ @@ -40,6 +41,7 @@ RUN set -x && \ libffi-dev \ libpq-dev \ libssl-dev \ + libtool \ make \ netbase \ netcat \ @@ -59,6 +61,21 @@ RUN set -x && \ /usr/share/doc \ /usr/share/doc-base +# Install LibYAML +ENV LD_LIBRARY_PATH=/usr/local/lib + +ARG LIBYAML_VERSION=0.2.5 +RUN set -ex \ + && git clone https://github.com/yaml/libyaml.git \ + && cd libyaml \ + && git checkout $LIBYAML_VERSION \ + && ./bootstrap \ + && ./configure \ + && make \ + && make install \ + && cd .. \ + && rm -fr libyaml + # Create deckhand user RUN useradd -ms /bin/bash deckhand