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
This commit is contained in:
Phil Sphicas 2020-09-09 02:26:07 +00:00
parent 0325f82d55
commit 9c8069d26a
3 changed files with 51 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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