diff --git a/docker/dockbuild.sh b/docker/dockbuild.sh index 12ef14e..2141b2c 100755 --- a/docker/dockbuild.sh +++ b/docker/dockbuild.sh @@ -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 diff --git a/docker/ejsonschema/Dockerfile b/docker/ejsonschema/Dockerfile index c635ec2..32f8039 100644 --- a/docker/ejsonschema/Dockerfile +++ b/docker/ejsonschema/Dockerfile @@ -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 diff --git a/docker/jq/Dockerfile b/docker/jq/Dockerfile index a4dca55..863631c 100644 --- a/docker/jq/Dockerfile +++ b/docker/jq/Dockerfile @@ -1,4 +1,4 @@ -From oar-metadata/pymongo +From oar-metadata/pymongo-py2 RUN apt-get update && \ apt-get install -y curl @@ -6,13 +6,17 @@ RUN apt-get update && \ 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"]