diff --git a/Docker/build.sh b/Docker/build.sh index 5be9138de32c808cd661ef3b6ed1c2de8de643c7..a0c2d7ce86f545762cef7c280cc4cef1206925ec 100755 --- a/Docker/build.sh +++ b/Docker/build.sh @@ -1,15 +1,16 @@ #sh!/bin/bash -ex tag=$1 +shift test -n "$tag" git diff $tag # git rev-parse --short ${TAG} hash=$(git rev-parse --short HEAD) echo building rGIT${hash} sleep 1 -docker build --no-cache --build-arg BORT=${tag} . -f shellb3-cspp-py38.Dockerfile \ +docker build "$@" --build-arg BORT=${tag} . -f shellb3-cspp-py38.Dockerfile \ -t shellb3-cspp-py38:latest \ - -t gitlab.ssec.wisc.edu:5555/cspp/buildbucket/shellb3/shellb3-centos7-gcc8-cspp-py38:rGIT${hash} \ - -t gitlab.ssec.wisc.edu:5555/cspp/buildbucket/shellb3/shellb3-centos7-gcc8-cspp-py38:latest + -t gitlab.ssec.wisc.edu:5555/cspp/buildbucket/shellb3/shellb3-centos7-gcc10-cspp-py38:rGIT${hash} \ + -t gitlab.ssec.wisc.edu:5555/cspp/buildbucket/shellb3/shellb3-centos7-gcc10-cspp-py38:latest echo docker push gitlab.ssec.wisc.edu:5555/cspp/buildbucket/shellb3/shellb3-centos7-gcc8-cspp-py38:rGIT${hash} echo docker push gitlab.ssec.wisc.edu:5555/cspp/buildbucket/shellb3/shellb3-centos7-gcc8-cspp-py38:latest diff --git a/Docker/shellb3-cspp-himawari-satpy-py38.Dockerfile b/Docker/shellb3-cspp-himawari-satpy-py38.Dockerfile index 838079704104a63b4e2a029cfbd2f9b7bf7e8b1c..3e1015ceffc1f9c3237ed75e0fc913cdc92c1788 100644 --- a/Docker/shellb3-cspp-himawari-satpy-py38.Dockerfile +++ b/Docker/shellb3-cspp-himawari-satpy-py38.Dockerfile @@ -1,6 +1,6 @@ # docker build . -f shellb3-cspp-himawari-satpy-py38.Dockerfile -t shellb3-cspp-himawari-satpy-py38:latest # docker run -e SHELLB3_ARCHIVE_DIR=/dock -it --rm -v $HOME/dock:/dock -w /opt/shellb3-cspp-py38/ShellB3 shellb3-cspp-himawari-satpy-py38 /bin/bash -l -c "unset LANG; bash shallbethree.sh bin_dist" -ARG BASE=gitlab.ssec.wisc.edu:5555/cspp/buildbucket/shellb3/shellb3-centos7-gcc8-cspp-py38:rGIT87ffe253 +ARG BASE=gitlab.ssec.wisc.edu:5555/cspp/buildbucket/shellb3/shellb3-centos7-gcc10-cspp-py38:rGIT01ddfa86 FROM $BASE RUN curl -o /work/himawari-master.tar.bz2 -sS https://gitlab.ssec.wisc.edu/rayg/himawari/-/archive/master/himawari-master.tar.bz2 \ && ShellB3/ShellB3/bin/pip3 install /work/himawari-master.tar.bz2 \ diff --git a/Docker/shellb3-cspp-py38.Dockerfile b/Docker/shellb3-cspp-py38.Dockerfile index 82fc0b9f82177a88afb012bc0ba2eee9ec90f787..4b7e9edd1bed5942f86cfcb95e0cfca0168646eb 100644 --- a/Docker/shellb3-cspp-py38.Dockerfile +++ b/Docker/shellb3-cspp-py38.Dockerfile @@ -14,11 +14,11 @@ RUN ln -s /opt/shellb3-cspp-py38 /work/ShellB3 ARG PYTHON_VERSION=38 WORKDIR /opt/shellb3-cspp-py38/ShellB3 ENV MAKEFLAGS=-j24 -RUN ./shallbethree.sh mk_gcc8 +RUN export HOSTNAME=${TRIM} && ./shallbethree.sh mk_gcc10 ARG LINUXCPUFLAGS="-march=ivybridge -fPIC" ENV LINUXCPUFLAGS="${LINUXCPUFLAGS}" # numcodecs will break on avx2 build when ivybridge arch is forced ENV DISABLE_NUMCODECS_AVX2=correctamundo -RUN ./shallbethree.sh mk_${TRIM} +RUN export HOSTNAME=${TRIM} && ./shallbethree.sh mk_${TRIM} WORKDIR /work RUN echo export HOSTNAME=$(perl -ne '/.*"HOSTNAME": "(\w+)",/ && print "$1";' </opt/shellb3-cspp-py38/ShellB3/build/.build_env.json) >/etc/profile.d/99-build-host.sh diff --git a/Docker/test-ssl-c7r/go.sh b/Docker/test-ssl-c7r/go.sh new file mode 100755 index 0000000000000000000000000000000000000000..ef4b9053c04c7807fe0210882f1d95204d62b481 --- /dev/null +++ b/Docker/test-ssl-c7r/go.sh @@ -0,0 +1,18 @@ +#!/bin/bash -e +SB3=${SB3:-$(readlink -f $HOME/opt/ShellB3)} +notfound() { + echo 'ERROR: set SB3 to ShellB3 directory to test' + exit 1 +} +test -x $SB3/bin/python3 || notfound + +ssl-test() { + local img="$1" + docker run -it --rm -v$SB3:/opt/ShellB3:ro -v$PWD:/work -w /opt/ShellB3/bin ${img} /work/ssl-test.sh +} + +for img in centos:7 centos:8 docker.io/opensuse/tumbleweed docker.io/opensuse/leap ubuntu:16.04 ubuntu:18.04 ubuntu:20.04; do + echo "+++ $img" + ssl-test $img; +done + diff --git a/Docker/test-ssl-c7r/ssl-test.sh b/Docker/test-ssl-c7r/ssl-test.sh new file mode 100755 index 0000000000000000000000000000000000000000..d1b03258b273a7a2365941f3a870e827b98acd2e --- /dev/null +++ b/Docker/test-ssl-c7r/ssl-test.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# ssl-test() { local img="$1"; docker run -it --rm -v$PWD:/work -w /work/ShellB3/bin ${img} /work/ssl-test.sh } +# for img in centos:7 centos:8 ubuntu:16.04 ubuntu:18.04 ubuntu:20.04 docker.io/opensuse/tumbleweed docker.io/opensuse/leap; do ssl-test $img; done + +if apt update &>/dev/null; then + apt -y install libssl1.1 ca-certificates &>/dev/null || apt -y install libssl1.0.0 ca-certificates &>/dev/null + echo Ubuntu/Debian requires libssl1.1 and ca-certificates packages +elif test ! -e /usr/lib64/libcrypt.so.1; then + ln -s libcrypto.so.1.1 /usr/lib64/libcrypt.so.1 &>/dev/null + echo OpenSUSE requires libcrypt.so.1 softlink to /usr/lib64/libcrypto.so.1.1 +fi + +./python3 -c 'from urllib import request as req; txt = req.urlopen("https://www.ssec.wisc.edu").read(); print(len(txt) > 0)' +