Skip to content

Commit a0a9f44

Browse files
committed
Latest version of yq is now installed by default
1 parent 68ffffe commit a0a9f44

6 files changed

Lines changed: 78 additions & 90 deletions

File tree

docker/python-3.10-bullseye/Dockerfile

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ ENV LANGUAGE en_US:en
2828
ENV LANG en_US.UTF-8
2929
ENV LANG4GEN en_US.utf8
3030
ENV LC_ALL $LANG
31-
# Check https://github.com/SOCI/soci/tags for the latest releases
32-
ENV SOCI_VER 4.0.2
33-
# Check https://github.com/mikefarah/yq/releases/latest for the latest releases
34-
ENV YQ_VERSION 4.13.5
3531

3632
# Update the system
3733
#RUN echo "Europe/Paris" > /etc/timezone
@@ -81,20 +77,22 @@ RUN apt-get -y install libmpich-dev libopenmpi-dev \
8177
# Cleaning
8278
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
8379

84-
# yq, the YAML CLI utility like jq, but for YAML
85-
RUN curl -L -s \
86-
https://github.com/mikefarah/yq/releases/download/v$YQ_VERSION/yq_linux_amd64 \
87-
-o /usr/local/bin/yq && \
88-
chmod 775 /usr/local/bin/yq
80+
# yq, the YAML CLI utility like jq, for YAML (https://github.com/mikefarah/yq)
81+
RUN YQ_VER=$(curl -Ls https://api.github.com/repos/mikefarah/yq/releases/latest | grep 'tag_name' | cut -d'v' -f2 | cut -d'"' -f1) && \
82+
curl -Ls \
83+
https://github.com/mikefarah/yq/releases/download/v${YQ_VER}/yq_linux_amd64 \
84+
-o /usr/local/bin/yq && \
85+
chmod 775 /usr/local/bin/yq
8986

90-
# SOCI
87+
# SOCI (https://github.com/SOCI/soci)
9188
RUN mkdir -p /opt/soci
9289
ADD resources/soci-debian-cmake.patch /opt/soci/soci-debian-cmake.patch
93-
RUN curl -L -s \
94-
https://github.com/SOCI/soci/archive/refs/tags/v$SOCI_VER.tar.gz \
95-
-o /opt/soci/soci-$SOCI_VER.tar.gz && cd /opt/soci && \
96-
tar zxf soci-$SOCI_VER.tar.gz && rm -f soci-$SOCI_VER.tar.gz && \
97-
cd soci-$SOCI_VER && patch -p1 < ../soci-debian-cmake.patch && \
90+
RUN SOCI_VER=$(curl -Ls https://api.github.com/repos/SOCI/soci/tags|jq -r '.[].name'|grep "^v"|sort -r|head -1|cut -d'v' -f2,2) && \
91+
curl -Ls \
92+
https://github.com/SOCI/soci/archive/refs/tags/v${SOCI_VER}.tar.gz \
93+
-o /opt/soci/soci-${SOCI_VER}.tar.gz && cd /opt/soci && \
94+
tar zxf soci-${SOCI_VER}.tar.gz && rm -f soci-${SOCI_VER}.tar.gz && \
95+
cd soci-${SOCI_VER} && patch -p1 < ../soci-debian-cmake.patch && \
9896
mkdir -p build && cd build && \
9997
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
10098
-DSOCI_CXX11=ON -DSOCI_TESTS=OFF .. && \

docker/python-3.10-buster/Dockerfile

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ ENV LANGUAGE en_US:en
2828
ENV LANG en_US.UTF-8
2929
ENV LANG4GEN en_US.utf8
3030
ENV LC_ALL $LANG
31-
# Check https://github.com/SOCI/soci/tags for the latest releases
32-
ENV SOCI_VER 4.0.2
33-
# Check https://github.com/mikefarah/yq/releases/latest for the latest releases
34-
ENV YQ_VERSION 4.13.5
3531

3632
# Update the system
3733
#RUN echo "Europe/Paris" > /etc/timezone
@@ -81,20 +77,22 @@ RUN apt-get -y install libmpich-dev libopenmpi-dev \
8177
# Cleaning
8278
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
8379

84-
# yq, the YAML CLI utility like jq, but for YAML
85-
RUN curl -L -s \
86-
https://github.com/mikefarah/yq/releases/download/v$YQ_VERSION/yq_linux_amd64 \
87-
-o /usr/local/bin/yq && \
88-
chmod 775 /usr/local/bin/yq
80+
# yq, the YAML CLI utility like jq, for YAML (https://github.com/mikefarah/yq)
81+
RUN YQ_VER=$(curl -Ls https://api.github.com/repos/mikefarah/yq/releases/latest | grep 'tag_name' | cut -d'v' -f2 | cut -d'"' -f1) && \
82+
curl -Ls \
83+
https://github.com/mikefarah/yq/releases/download/v${YQ_VER}/yq_linux_amd64 \
84+
-o /usr/local/bin/yq && \
85+
chmod 775 /usr/local/bin/yq
8986

90-
# SOCI
87+
# SOCI (https://github.com/SOCI/soci)
9188
RUN mkdir -p /opt/soci
9289
ADD resources/soci-debian-cmake.patch /opt/soci/soci-debian-cmake.patch
93-
RUN curl -L -s \
94-
https://github.com/SOCI/soci/archive/refs/tags/v$SOCI_VER.tar.gz \
95-
-o /opt/soci/soci-$SOCI_VER.tar.gz && cd /opt/soci && \
96-
tar zxf soci-$SOCI_VER.tar.gz && rm -f soci-$SOCI_VER.tar.gz && \
97-
cd soci-$SOCI_VER && patch -p1 < ../soci-debian-cmake.patch && \
90+
RUN SOCI_VER=$(curl -Ls https://api.github.com/repos/SOCI/soci/tags|jq -r '.[].name'|grep "^v"|sort -r|head -1|cut -d'v' -f2,2) && \
91+
curl -Ls \
92+
https://github.com/SOCI/soci/archive/refs/tags/v${SOCI_VER}.tar.gz \
93+
-o /opt/soci/soci-${SOCI_VER}.tar.gz && cd /opt/soci && \
94+
tar zxf soci-${SOCI_VER}.tar.gz && rm -f soci-${SOCI_VER}.tar.gz && \
95+
cd soci-${SOCI_VER} && patch -p1 < ../soci-debian-cmake.patch && \
9896
mkdir -p build && cd build && \
9997
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
10098
-DSOCI_CXX11=ON -DSOCI_TESTS=OFF .. && \

docker/python-3.8-bullseye/Dockerfile

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ ENV LANGUAGE en_US:en
2828
ENV LANG en_US.UTF-8
2929
ENV LANG4GEN en_US.utf8
3030
ENV LC_ALL $LANG
31-
# Check https://github.com/SOCI/soci/tags for the latest releases
32-
ENV SOCI_VER 4.0.2
33-
# Check https://github.com/mikefarah/yq/releases/latest for the latest releases
34-
ENV YQ_VERSION 4.13.5
3531

3632
# Update the system
3733
#RUN echo "Europe/Paris" > /etc/timezone
@@ -81,20 +77,22 @@ RUN apt-get -y install libmpich-dev libopenmpi-dev \
8177
# Cleaning
8278
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
8379

84-
# yq, the YAML CLI utility like jq, but for YAML
85-
RUN curl -L -s \
86-
https://github.com/mikefarah/yq/releases/download/v$YQ_VERSION/yq_linux_amd64 \
87-
-o /usr/local/bin/yq && \
88-
chmod 775 /usr/local/bin/yq
80+
# yq, the YAML CLI utility like jq, for YAML (https://github.com/mikefarah/yq)
81+
RUN YQ_VER=$(curl -Ls https://api.github.com/repos/mikefarah/yq/releases/latest | grep 'tag_name' | cut -d'v' -f2 | cut -d'"' -f1) && \
82+
curl -Ls \
83+
https://github.com/mikefarah/yq/releases/download/v${YQ_VER}/yq_linux_amd64 \
84+
-o /usr/local/bin/yq && \
85+
chmod 775 /usr/local/bin/yq
8986

90-
# SOCI
87+
# SOCI (https://github.com/SOCI/soci)
9188
RUN mkdir -p /opt/soci
9289
ADD resources/soci-debian-cmake.patch /opt/soci/soci-debian-cmake.patch
93-
RUN curl -L -s \
94-
https://github.com/SOCI/soci/archive/refs/tags/v$SOCI_VER.tar.gz \
95-
-o /opt/soci/soci-$SOCI_VER.tar.gz && cd /opt/soci && \
96-
tar zxf soci-$SOCI_VER.tar.gz && rm -f soci-$SOCI_VER.tar.gz && \
97-
cd soci-$SOCI_VER && patch -p1 < ../soci-debian-cmake.patch && \
90+
RUN SOCI_VER=$(curl -Ls https://api.github.com/repos/SOCI/soci/tags|jq -r '.[].name'|grep "^v"|sort -r|head -1|cut -d'v' -f2,2) && \
91+
curl -Ls \
92+
https://github.com/SOCI/soci/archive/refs/tags/v${SOCI_VER}.tar.gz \
93+
-o /opt/soci/soci-${SOCI_VER}.tar.gz && cd /opt/soci && \
94+
tar zxf soci-${SOCI_VER}.tar.gz && rm -f soci-${SOCI_VER}.tar.gz && \
95+
cd soci-${SOCI_VER} && patch -p1 < ../soci-debian-cmake.patch && \
9896
mkdir -p build && cd build && \
9997
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
10098
-DSOCI_CXX11=ON -DSOCI_TESTS=OFF .. && \

docker/python-3.8-buster/Dockerfile

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ ENV LANGUAGE en_US:en
2828
ENV LANG en_US.UTF-8
2929
ENV LANG4GEN en_US.utf8
3030
ENV LC_ALL $LANG
31-
# Check https://github.com/SOCI/soci/tags for the latest releases
32-
ENV SOCI_VER 4.0.2
33-
# Check https://github.com/mikefarah/yq/releases/latest for the latest releases
34-
ENV YQ_VERSION 4.13.5
3531

3632
# Update the system
3733
#RUN echo "Europe/Paris" > /etc/timezone
@@ -81,20 +77,22 @@ RUN apt-get -y install libmpich-dev libopenmpi-dev \
8177
# Cleaning
8278
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
8379

84-
# yq, the YAML CLI utility like jq, but for YAML
85-
RUN curl -L -s \
86-
https://github.com/mikefarah/yq/releases/download/v$YQ_VERSION/yq_linux_amd64 \
87-
-o /usr/local/bin/yq && \
88-
chmod 775 /usr/local/bin/yq
80+
# yq, the YAML CLI utility like jq, for YAML (https://github.com/mikefarah/yq)
81+
RUN YQ_VER=$(curl -Ls https://api.github.com/repos/mikefarah/yq/releases/latest | grep 'tag_name' | cut -d'v' -f2 | cut -d'"' -f1) && \
82+
curl -Ls \
83+
https://github.com/mikefarah/yq/releases/download/v${YQ_VER}/yq_linux_amd64 \
84+
-o /usr/local/bin/yq && \
85+
chmod 775 /usr/local/bin/yq
8986

90-
# SOCI
87+
# SOCI (https://github.com/SOCI/soci)
9188
RUN mkdir -p /opt/soci
9289
ADD resources/soci-debian-cmake.patch /opt/soci/soci-debian-cmake.patch
93-
RUN curl -L -s \
94-
https://github.com/SOCI/soci/archive/refs/tags/v$SOCI_VER.tar.gz \
95-
-o /opt/soci/soci-$SOCI_VER.tar.gz && cd /opt/soci && \
96-
tar zxf soci-$SOCI_VER.tar.gz && rm -f soci-$SOCI_VER.tar.gz && \
97-
cd soci-$SOCI_VER && patch -p1 < ../soci-debian-cmake.patch && \
90+
RUN SOCI_VER=$(curl -Ls https://api.github.com/repos/SOCI/soci/tags|jq -r '.[].name'|grep "^v"|sort -r|head -1|cut -d'v' -f2,2) && \
91+
curl -Ls \
92+
https://github.com/SOCI/soci/archive/refs/tags/v${SOCI_VER}.tar.gz \
93+
-o /opt/soci/soci-${SOCI_VER}.tar.gz && cd /opt/soci && \
94+
tar zxf soci-${SOCI_VER}.tar.gz && rm -f soci-${SOCI_VER}.tar.gz && \
95+
cd soci-${SOCI_VER} && patch -p1 < ../soci-debian-cmake.patch && \
9896
mkdir -p build && cd build && \
9997
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
10098
-DSOCI_CXX11=ON -DSOCI_TESTS=OFF .. && \

docker/python-3.9-bullseye/Dockerfile

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ ENV LANGUAGE en_US:en
2828
ENV LANG en_US.UTF-8
2929
ENV LANG4GEN en_US.utf8
3030
ENV LC_ALL $LANG
31-
# Check https://github.com/SOCI/soci/tags for the latest releases
32-
ENV SOCI_VER 4.0.2
33-
# Check https://github.com/mikefarah/yq/releases/latest for the latest releases
34-
ENV YQ_VERSION 4.13.5
3531

3632
# Update the system
3733
#RUN echo "Europe/Paris" > /etc/timezone
@@ -81,20 +77,22 @@ RUN apt-get -y install libmpich-dev libopenmpi-dev \
8177
# Cleaning
8278
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
8379

84-
# yq, the YAML CLI utility like jq, but for YAML
85-
RUN curl -L -s \
86-
https://github.com/mikefarah/yq/releases/download/v$YQ_VERSION/yq_linux_amd64 \
87-
-o /usr/local/bin/yq && \
88-
chmod 775 /usr/local/bin/yq
80+
# yq, the YAML CLI utility like jq, for YAML (https://github.com/mikefarah/yq)
81+
RUN YQ_VER=$(curl -Ls https://api.github.com/repos/mikefarah/yq/releases/latest | grep 'tag_name' | cut -d'v' -f2 | cut -d'"' -f1) && \
82+
curl -Ls \
83+
https://github.com/mikefarah/yq/releases/download/v${YQ_VER}/yq_linux_amd64 \
84+
-o /usr/local/bin/yq && \
85+
chmod 775 /usr/local/bin/yq
8986

90-
# SOCI
87+
# SOCI (https://github.com/SOCI/soci)
9188
RUN mkdir -p /opt/soci
9289
ADD resources/soci-debian-cmake.patch /opt/soci/soci-debian-cmake.patch
93-
RUN curl -L -s \
94-
https://github.com/SOCI/soci/archive/refs/tags/v$SOCI_VER.tar.gz \
95-
-o /opt/soci/soci-$SOCI_VER.tar.gz && cd /opt/soci && \
96-
tar zxf soci-$SOCI_VER.tar.gz && rm -f soci-$SOCI_VER.tar.gz && \
97-
cd soci-$SOCI_VER && patch -p1 < ../soci-debian-cmake.patch && \
90+
RUN SOCI_VER=$(curl -Ls https://api.github.com/repos/SOCI/soci/tags|jq -r '.[].name'|grep "^v"|sort -r|head -1|cut -d'v' -f2,2) && \
91+
curl -Ls \
92+
https://github.com/SOCI/soci/archive/refs/tags/v${SOCI_VER}.tar.gz \
93+
-o /opt/soci/soci-${SOCI_VER}.tar.gz && cd /opt/soci && \
94+
tar zxf soci-${SOCI_VER}.tar.gz && rm -f soci-${SOCI_VER}.tar.gz && \
95+
cd soci-${SOCI_VER} && patch -p1 < ../soci-debian-cmake.patch && \
9896
mkdir -p build && cd build && \
9997
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
10098
-DSOCI_CXX11=ON -DSOCI_TESTS=OFF .. && \

docker/python-3.9-buster/Dockerfile

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ ENV LANGUAGE en_US:en
2828
ENV LANG en_US.UTF-8
2929
ENV LANG4GEN en_US.utf8
3030
ENV LC_ALL $LANG
31-
# Check https://github.com/SOCI/soci/tags for the latest releases
32-
ENV SOCI_VER 4.0.2
33-
# Check https://github.com/mikefarah/yq/releases/latest for the latest releases
34-
ENV YQ_VERSION 4.13.5
3531

3632
# Update the system
3733
#RUN echo "Europe/Paris" > /etc/timezone
@@ -81,20 +77,22 @@ RUN apt-get -y install libmpich-dev libopenmpi-dev \
8177
# Cleaning
8278
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
8379

84-
# yq, the YAML CLI utility like jq, but for YAML
85-
RUN curl -L -s \
86-
https://github.com/mikefarah/yq/releases/download/v$YQ_VERSION/yq_linux_amd64 \
87-
-o /usr/local/bin/yq && \
88-
chmod 775 /usr/local/bin/yq
80+
# yq, the YAML CLI utility like jq, for YAML (https://github.com/mikefarah/yq)
81+
RUN YQ_VER=$(curl -Ls https://api.github.com/repos/mikefarah/yq/releases/latest | grep 'tag_name' | cut -d'v' -f2 | cut -d'"' -f1) && \
82+
curl -Ls \
83+
https://github.com/mikefarah/yq/releases/download/v${YQ_VER}/yq_linux_amd64 \
84+
-o /usr/local/bin/yq && \
85+
chmod 775 /usr/local/bin/yq
8986

90-
# SOCI
87+
# SOCI (https://github.com/SOCI/soci)
9188
RUN mkdir -p /opt/soci
9289
ADD resources/soci-debian-cmake.patch /opt/soci/soci-debian-cmake.patch
93-
RUN curl -L -s \
94-
https://github.com/SOCI/soci/archive/refs/tags/v$SOCI_VER.tar.gz \
95-
-o /opt/soci/soci-$SOCI_VER.tar.gz && cd /opt/soci && \
96-
tar zxf soci-$SOCI_VER.tar.gz && rm -f soci-$SOCI_VER.tar.gz && \
97-
cd soci-$SOCI_VER && patch -p1 < ../soci-debian-cmake.patch && \
90+
RUN SOCI_VER=$(curl -Ls https://api.github.com/repos/SOCI/soci/tags|jq -r '.[].name'|grep "^v"|sort -r|head -1|cut -d'v' -f2,2) && \
91+
curl -Ls \
92+
https://github.com/SOCI/soci/archive/refs/tags/v${SOCI_VER}.tar.gz \
93+
-o /opt/soci/soci-${SOCI_VER}.tar.gz && cd /opt/soci && \
94+
tar zxf soci-${SOCI_VER}.tar.gz && rm -f soci-${SOCI_VER}.tar.gz && \
95+
cd soci-${SOCI_VER} && patch -p1 < ../soci-debian-cmake.patch && \
9896
mkdir -p build && cd build && \
9997
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \
10098
-DSOCI_CXX11=ON -DSOCI_TESTS=OFF .. && \

0 commit comments

Comments
 (0)