Skip to content

Commit

Permalink
uprev jq for py2 build
Browse files Browse the repository at this point in the history
  • Loading branch information
RayPlante committed Jul 7, 2024
1 parent f02e86f commit 39bc38d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docker/dockbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PACKAGE_NAME=oar-metadata
## containers to be built. List them in dependency order (where a latter one
## depends the former ones).
#
DOCKER_IMAGE_DIRS="pymongo jqfromsrc ejsonschema mdtests"
DOCKER_IMAGE_DIRS="pymongo jq ejsonschema mdtests"

. $codedir/oar-build/_dockbuild.sh

Expand Down
2 changes: 1 addition & 1 deletion docker/ejsonschema/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM oar-metadata/jqfromsrc-py2:latest
FROM oar-metadata/jq-py2:latest

RUN apt-get update && apt-get install -y python python-pip python-dev unzip \
uwsgi uwsgi-plugin-python python-yaml
Expand Down
16 changes: 10 additions & 6 deletions docker/jq/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
From oar-metadata/pymongo
From oar-metadata/pymongo-py2

RUN apt-get update && \
apt-get install -y curl

WORKDIR /root

# Download a jq binary and do a checksum check on it
COPY jq.sha256 .
RUN curl -L -o jq-linux64 \
https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 && \
sha256sum -c jq.sha256
COPY jq-linux-amd64.sha256 jq-linux-arm64.sha256 ./
RUN arch=$(uname -m) && \
{ [ "$arch" != "x86_64" ] || arch="amd64"; [ "$arch" != "aarch64" ] || arch="arm64"; } && \
curl -L -o jq-linux-$arch \
https://github.com/stedolan/jq/releases/download/jq-1.7.1/jq-linux-$arch && \
sha256sum -c jq-linux-$arch.sha256

# install jq
RUN chmod a+x jq-linux64 && cp jq-linux64 /usr/local/bin/jq
RUN arch=$(uname -m) && \
{ [ "$arch" != "x86_64" ] || arch="amd64"; [ "$arch" != "aarch64" ] || arch="arm64"; } && \
chmod a+x jq-linux-$arch && cp jq-linux-$arch /usr/local/bin/jq

CMD ["bash"]

Expand Down

0 comments on commit 39bc38d

Please sign in to comment.