From a8d9a053a4216350d2f8832e2beaf26bdfb2bf2a Mon Sep 17 00:00:00 2001 From: Marcel R Date: Fri, 25 Nov 2022 16:13:39 +0100 Subject: [PATCH] Add centos8 images based on conda. --- .github/workflows/deploy_images.yml | 108 ++++++++++++++---- docker/Docker_centos8_py37 | 77 +++++++++++++ docker/Docker_centos8_py38 | 77 +++++++++++++ docker/Docker_centos8_py39 | 77 +++++++++++++ docker/Dockerfile_centos7_py27 | 12 +- docker/Dockerfile_centos7_py310 | 12 +- docker/Dockerfile_centos7_py311 | 12 +- docker/Dockerfile_centos7_py36 | 12 +- docker/Dockerfile_centos7_py37 | 12 +- docker/Dockerfile_centos7_py38 | 12 +- docker/Dockerfile_centos7_py39 | 14 +-- ...ile_centos7_example => Dockerfile_example} | 0 docker/bashrc | 2 + 13 files changed, 346 insertions(+), 81 deletions(-) create mode 100644 docker/Docker_centos8_py37 create mode 100644 docker/Docker_centos8_py38 create mode 100644 docker/Docker_centos8_py39 rename docker/{Dockerfile_centos7_example => Dockerfile_example} (100%) diff --git a/.github/workflows/deploy_images.yml b/.github/workflows/deploy_images.yml index 03158c3e..d384737d 100644 --- a/.github/workflows/deploy_images.yml +++ b/.github/workflows/deploy_images.yml @@ -8,13 +8,13 @@ on: required: false default: 'false' specific_job: - description: Run a specific job? (py27|py36|py37|py38|py39|py310|py311|example) + description: Run a specific job? (py27|py36|py37|py38|py39|py310|py311|c7|c8|example) required: false default: '' jobs: - py27: - if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'py27') }} + c7-py27: + if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c7-py27') || contains(github.event.inputs.specific_job, 'py27') || contains(github.event.inputs.specific_job, 'c7') }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -28,13 +28,13 @@ jobs: path: docker dockerfile: docker/Dockerfile_centos7_py27 repository: riga/law - tags: py27,py2 + tags: c7-py27,py27,py2 push: ${{ github.event.inputs.build_only != 'true' }} username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - py36: - if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'py36') }} + c7-py36: + if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c7-py36') || contains(github.event.inputs.specific_job, 'py36') || contains(github.event.inputs.specific_job, 'c7') }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -48,13 +48,13 @@ jobs: path: docker dockerfile: docker/Dockerfile_centos7_py36 repository: riga/law - tags: py36 + tags: c7-py36,py36 push: ${{ github.event.inputs.build_only != 'true' }} username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - py37: - if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'py37') }} + c7-py37: + if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c7-py37') || contains(github.event.inputs.specific_job, 'py37') || contains(github.event.inputs.specific_job, 'c7') }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -68,13 +68,33 @@ jobs: path: docker dockerfile: docker/Dockerfile_centos7_py37 repository: riga/law - tags: py37 + tags: c7-py37 push: ${{ github.event.inputs.build_only != 'true' }} username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - py38: - if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'py38') }} + c8-py37: + if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c8-py37') || contains(github.event.inputs.specific_job, 'py37') || contains(github.event.inputs.specific_job, 'c8') }} + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v3 + with: + persist-credentials: false + + - name: Build and deploy image 🐳 + uses: docker/build-push-action@v1 + with: + path: docker + dockerfile: docker/Dockerfile_centos8_py37 + repository: riga/law + tags: c8-py37,py37 + push: ${{ github.event.inputs.build_only != 'true' }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + c7-py38: + if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c7-py38') || contains(github.event.inputs.specific_job, 'py38') || contains(github.event.inputs.specific_job, 'c7') }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -88,13 +108,33 @@ jobs: path: docker dockerfile: docker/Dockerfile_centos7_py38 repository: riga/law - tags: py38 + tags: c7-py38 + push: ${{ github.event.inputs.build_only != 'true' }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + c8-py37: + if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c8-py38') || contains(github.event.inputs.specific_job, 'py38') || contains(github.event.inputs.specific_job, 'c8') }} + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v3 + with: + persist-credentials: false + + - name: Build and deploy image 🐳 + uses: docker/build-push-action@v1 + with: + path: docker + dockerfile: docker/Dockerfile_centos8_py38 + repository: riga/law + tags: c8-py38,py38 push: ${{ github.event.inputs.build_only != 'true' }} username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - py39: - if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'py39') || contains(github.event.inputs.specific_job, 'example') }} + c7-py39: + if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c7-py39') || contains(github.event.inputs.specific_job, 'py39') || contains(github.event.inputs.specific_job, 'c7') }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -108,13 +148,33 @@ jobs: path: docker dockerfile: docker/Dockerfile_centos7_py39 repository: riga/law - tags: py39,py3,latest + tags: c7-py39,c7-py3 + push: ${{ github.event.inputs.build_only != 'true' }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + c8-py39: + if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c8-py39') || contains(github.event.inputs.specific_job, 'py39') || contains(github.event.inputs.specific_job, 'c8') }} + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v3 + with: + persist-credentials: false + + - name: Build and deploy image 🐳 + uses: docker/build-push-action@v1 + with: + path: docker + dockerfile: docker/Dockerfile_centos8_py39 + repository: riga/law + tags: c8-py39,c8-py3,c8,py39,py3,latest push: ${{ github.event.inputs.build_only != 'true' }} username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - py310: - if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'py310') }} + c7-py310: + if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c7-py310') || contains(github.event.inputs.specific_job, 'py310') || contains(github.event.inputs.specific_job, 'c7') }} runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -128,14 +188,14 @@ jobs: path: docker dockerfile: docker/Dockerfile_centos7_py310 repository: riga/law - tags: py310 + tags: c7-py310,py310 push: ${{ github.event.inputs.build_only != 'true' }} username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} # NOTE: disabled for now due to some gfal2-bindings issue - # py311: - # if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'py311') }} + # c7-py311: + # if: ${{ github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'c7-py311') || contains(github.event.inputs.specific_job, 'py311') || contains(github.event.inputs.specific_job, 'c7') }} # runs-on: ubuntu-latest # steps: # - name: Checkout 🛎️ @@ -149,14 +209,14 @@ jobs: # path: docker # dockerfile: docker/Dockerfile_centos7_py311 # repository: riga/law - # tags: py311 + # tags: c7-py311 # push: ${{ github.event.inputs.build_only != 'true' }} # username: ${{ secrets.DOCKERHUB_USERNAME }} # password: ${{ secrets.DOCKERHUB_TOKEN }} example: if: ${{ github.event.inputs.build_only != 'true' && (github.event.inputs.specific_job == '' || contains(github.event.inputs.specific_job, 'example')) }} - needs: py39 + needs: c8-py39 runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -168,7 +228,7 @@ jobs: uses: docker/build-push-action@v1 with: path: docker - dockerfile: docker/Dockerfile_centos7_example + dockerfile: docker/Dockerfile_example repository: riga/law tags: example push: true diff --git a/docker/Docker_centos8_py37 b/docker/Docker_centos8_py37 new file mode 100644 index 00000000..2f7d8a08 --- /dev/null +++ b/docker/Docker_centos8_py37 @@ -0,0 +1,77 @@ +FROM centos:8 + +# labels +LABEL law.version="0.1.8" +LABEL law.image_name="riga/law" +LABEL law.image_tag="c8-py37" +LABEL law.image_os="centos8" +LABEL law.image_python_major="3" +LABEL law.image_python_minor="7" +LABEL law.image_python="3.7" + +# law specific environment variables +ENV LAW_IMAGE_ROOT /root/law +ENV LAW_IMAGE_NAME riga/law +ENV LAW_IMAGE_TAG c8-py37 +ENV LAW_IMAGE_PYTHON_MAJOR 3 +ENV LAW_IMAGE_PYTHON_MINOR 7 +ENV LAW_IMAGE_PYTHON ${LAW_IMAGE_PYTHON_MAJOR}.${LAW_IMAGE_PYTHON_MINOR} +ENV LAW_CONDA_ROOT /root/conda +ENV LAW_CONDA_VERSION 4.12.0 +ENV LAW_CONDA_INSTALL_FILE https://repo.anaconda.com/miniconda/Miniconda${LAW_IMAGE_PYTHON_MAJOR}-py${LAW_IMAGE_PYTHON_MAJOR}${LAW_IMAGE_PYTHON_MINOR}_${LAW_CONDA_VERSION}-Linux-x86_64.sh +ENV LAW_SANDBOX docker::riga/law:c8-py37,docker::riga/law:py37 + +# exposed ports +EXPOSE 8082 + +# bash files +COPY bash_profile /root/.bash_profile +COPY bashrc /root/.bashrc + +# installation workdir +WORKDIR /root/install + +# prepare yum +RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \ + sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* +RUN sed -i -r 's/^(override_install_langs=.+)/#\1/' /etc/yum.conf +RUN yum -y update; yum clean all +RUN yum -y install yum-utils epel-release wget; yum clean all + +# setup conda +ENV PATH ${LAW_CONDA_ROOT}/bin:${PATH} +RUN wget "${LAW_CONDA_INSTALL_FILE}" -O setup_miniconda.sh -q && \ + bash setup_miniconda.sh -b -u -p "${LAW_CONDA_ROOT}" && \ + rm setup_miniconda.sh +RUN echo $'\n\ +changeps1: false\n\ +channels:\n\ + - conda-forge\n\ + - defaults\n\ +' >> "${LAW_CONDA_ROOT}/.condarc" +SHELL ["conda", "run", "-n", "base", "/bin/bash", "-c"] + +# conda packages +RUN conda install --yes libgcc gcc which wget nano micro screen git git-lfs cmake ncurses readline && \ + conda clean --all +RUN conda install --yes gfal2 gfal2-util python-gfal2 && \ + conda clean --all + +# python packages +RUN pip install --no-cache-dir --upgrade pip +RUN pip install --no-cache-dir --upgrade setuptools +RUN pip install --no-cache-dir slackclient python-telegram-bot +RUN pip install --no-cache-dir flake8 flake8-quotes flake8-commas pytest-cov + +# cleanup installation workdir +WORKDIR /root +RUN rm -rf /root/install + +# install law master +RUN git clone --recursive https://github.com/riga/law "${LAW_IMAGE_ROOT}" && \ + cd "${LAW_IMAGE_ROOT}" && \ + pip install --no-cache-dir . +WORKDIR ${LAW_IMAGE_ROOT} + +# init command +SHELL ["conda", "run", "-n", "base", "/bin/bash", "-i", "--login"] diff --git a/docker/Docker_centos8_py38 b/docker/Docker_centos8_py38 new file mode 100644 index 00000000..380a9b81 --- /dev/null +++ b/docker/Docker_centos8_py38 @@ -0,0 +1,77 @@ +FROM centos:8 + +# labels +LABEL law.version="0.1.8" +LABEL law.image_name="riga/law" +LABEL law.image_tag="c8-py38" +LABEL law.image_os="centos8" +LABEL law.image_python_major="3" +LABEL law.image_python_minor="8" +LABEL law.image_python="3.8" + +# law specific environment variables +ENV LAW_IMAGE_ROOT /root/law +ENV LAW_IMAGE_NAME riga/law +ENV LAW_IMAGE_TAG c8-py38 +ENV LAW_IMAGE_PYTHON_MAJOR 3 +ENV LAW_IMAGE_PYTHON_MINOR 8 +ENV LAW_IMAGE_PYTHON ${LAW_IMAGE_PYTHON_MAJOR}.${LAW_IMAGE_PYTHON_MINOR} +ENV LAW_CONDA_ROOT /root/conda +ENV LAW_CONDA_VERSION 4.12.0 +ENV LAW_CONDA_INSTALL_FILE https://repo.anaconda.com/miniconda/Miniconda${LAW_IMAGE_PYTHON_MAJOR}-py${LAW_IMAGE_PYTHON_MAJOR}${LAW_IMAGE_PYTHON_MINOR}_${LAW_CONDA_VERSION}-Linux-x86_64.sh +ENV LAW_SANDBOX docker::riga/law:c8-py38,docker::riga/law:py38 + +# exposed ports +EXPOSE 8082 + +# bash files +COPY bash_profile /root/.bash_profile +COPY bashrc /root/.bashrc + +# installation workdir +WORKDIR /root/install + +# prepare yum +RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \ + sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* +RUN sed -i -r 's/^(override_install_langs=.+)/#\1/' /etc/yum.conf +RUN yum -y update; yum clean all +RUN yum -y install yum-utils epel-release wget; yum clean all + +# setup conda +ENV PATH ${LAW_CONDA_ROOT}/bin:${PATH} +RUN wget "${LAW_CONDA_INSTALL_FILE}" -O setup_miniconda.sh -q && \ + bash setup_miniconda.sh -b -u -p "${LAW_CONDA_ROOT}" && \ + rm setup_miniconda.sh +RUN echo $'\n\ +changeps1: false\n\ +channels:\n\ + - conda-forge\n\ + - defaults\n\ +' >> "${LAW_CONDA_ROOT}/.condarc" +SHELL ["conda", "run", "-n", "base", "/bin/bash", "-c"] + +# conda packages +RUN conda install --yes libgcc gcc which wget nano micro screen git git-lfs cmake ncurses readline && \ + conda clean --all +RUN conda install --yes gfal2 gfal2-util python-gfal2 && \ + conda clean --all + +# python packages +RUN pip install --no-cache-dir --upgrade pip +RUN pip install --no-cache-dir --upgrade setuptools +RUN pip install --no-cache-dir slackclient python-telegram-bot +RUN pip install --no-cache-dir flake8 flake8-quotes flake8-commas pytest-cov + +# cleanup installation workdir +WORKDIR /root +RUN rm -rf /root/install + +# install law master +RUN git clone --recursive https://github.com/riga/law "${LAW_IMAGE_ROOT}" && \ + cd "${LAW_IMAGE_ROOT}" && \ + pip install --no-cache-dir . +WORKDIR ${LAW_IMAGE_ROOT} + +# init command +SHELL ["conda", "run", "-n", "base", "/bin/bash", "-i", "--login"] diff --git a/docker/Docker_centos8_py39 b/docker/Docker_centos8_py39 new file mode 100644 index 00000000..97f1da16 --- /dev/null +++ b/docker/Docker_centos8_py39 @@ -0,0 +1,77 @@ +FROM centos:8 + +# labels +LABEL law.version="0.1.8" +LABEL law.image_name="riga/law" +LABEL law.image_tag="c8-py39" +LABEL law.image_os="centos8" +LABEL law.image_python_major="3" +LABEL law.image_python_minor="9" +LABEL law.image_python="3.9" + +# law specific environment variables +ENV LAW_IMAGE_ROOT /root/law +ENV LAW_IMAGE_NAME riga/law +ENV LAW_IMAGE_TAG c8-py39 +ENV LAW_IMAGE_PYTHON_MAJOR 3 +ENV LAW_IMAGE_PYTHON_MINOR 9 +ENV LAW_IMAGE_PYTHON ${LAW_IMAGE_PYTHON_MAJOR}.${LAW_IMAGE_PYTHON_MINOR} +ENV LAW_CONDA_ROOT /root/conda +ENV LAW_CONDA_VERSION 4.12.0 +ENV LAW_CONDA_INSTALL_FILE https://repo.anaconda.com/miniconda/Miniconda${LAW_IMAGE_PYTHON_MAJOR}-py${LAW_IMAGE_PYTHON_MAJOR}${LAW_IMAGE_PYTHON_MINOR}_${LAW_CONDA_VERSION}-Linux-x86_64.sh +ENV LAW_SANDBOX docker::riga/law:c8-py39,docker::riga/law:py39,docker::riga/law:c8-py3,docker::riga/law:py3,docker::riga/law:c8,docker::riga/law:latest,docker::riga/law + +# exposed ports +EXPOSE 8082 + +# bash files +COPY bash_profile /root/.bash_profile +COPY bashrc /root/.bashrc + +# installation workdir +WORKDIR /root/install + +# prepare yum +RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \ + sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* +RUN sed -i -r 's/^(override_install_langs=.+)/#\1/' /etc/yum.conf +RUN yum -y update; yum clean all +RUN yum -y install yum-utils epel-release wget; yum clean all + +# setup conda +ENV PATH ${LAW_CONDA_ROOT}/bin:${PATH} +RUN wget "${LAW_CONDA_INSTALL_FILE}" -O setup_miniconda.sh -q && \ + bash setup_miniconda.sh -b -u -p "${LAW_CONDA_ROOT}" && \ + rm setup_miniconda.sh +RUN echo $'\n\ +changeps1: false\n\ +channels:\n\ + - conda-forge\n\ + - defaults\n\ +' >> "${LAW_CONDA_ROOT}/.condarc" +SHELL ["conda", "run", "-n", "base", "/bin/bash", "-c"] + +# conda packages +RUN conda install --yes libgcc gcc which wget nano micro screen git git-lfs cmake ncurses readline && \ + conda clean --all +RUN conda install --yes gfal2 gfal2-util python-gfal2 && \ + conda clean --all + +# python packages +RUN pip install --no-cache-dir --upgrade pip +RUN pip install --no-cache-dir --upgrade setuptools +RUN pip install --no-cache-dir slackclient python-telegram-bot +RUN pip install --no-cache-dir flake8 flake8-quotes flake8-commas pytest-cov + +# cleanup installation workdir +WORKDIR /root +RUN rm -rf /root/install + +# install law master +RUN git clone --recursive https://github.com/riga/law "${LAW_IMAGE_ROOT}" && \ + cd "${LAW_IMAGE_ROOT}" && \ + pip install --no-cache-dir . +WORKDIR ${LAW_IMAGE_ROOT} + +# init command +SHELL ["conda", "run", "-n", "base", "/bin/bash", "-i", "--login"] diff --git a/docker/Dockerfile_centos7_py27 b/docker/Dockerfile_centos7_py27 index c4727a77..c49fbcb2 100644 --- a/docker/Dockerfile_centos7_py27 +++ b/docker/Dockerfile_centos7_py27 @@ -3,8 +3,7 @@ FROM centos:7 # labels LABEL law.version="0.1.8" LABEL law.image_name="riga/law" -LABEL law.image_tag="py27" -LABEL law.image_dir="law-py27" +LABEL law.image_tag="c7-py27" LABEL law.image_os="centos7" LABEL law.image_python_major="2" LABEL law.image_python_minor="7" @@ -13,9 +12,9 @@ LABEL law.image_python="2.7.5" LABEL law.image_python_mm="2.7" # law specific environment variables -ENV LAW_SANDBOX docker::riga/law:py27,docker::riga/law:py2 -ENV LAW_IMAGE_NAME law-py27 -ENV LAW_IMAGE_TAG py27 +ENV LAW_SANDBOX docker::riga/law:c7-py27,docker::riga/law:py27,docker::riga/law:py2 +ENV LAW_IMAGE_NAME riga/law +ENV LAW_IMAGE_TAG c7-py27 ENV LAW_IMAGE_PYTHON_MAJOR 2 ENV LAW_IMAGE_PYTHON_MINOR 7 ENV LAW_IMAGE_PYTHON_PATCH 5 @@ -96,8 +95,5 @@ RUN git clone https://github.com/riga/law "${LAW_IMAGE_SOURCE_DIR}" && \ pip install --no-cache-dir . WORKDIR ${LAW_IMAGE_SOURCE_DIR} -# shell initialization -RUN echo 'source "$( law completion )" ""' >> /root/.bash_profile - # init command CMD bash --login diff --git a/docker/Dockerfile_centos7_py310 b/docker/Dockerfile_centos7_py310 index e8e01a77..1b18ac8c 100644 --- a/docker/Dockerfile_centos7_py310 +++ b/docker/Dockerfile_centos7_py310 @@ -3,8 +3,7 @@ FROM centos:7 # labels LABEL law.version="0.1.8" LABEL law.image_name="riga/law" -LABEL law.image_tag="py310" -LABEL law.image_dir="law-py310" +LABEL law.image_tag="c7-py310" LABEL law.image_os="centos7" LABEL law.image_python_major="3" LABEL law.image_python_minor="10" @@ -13,9 +12,9 @@ LABEL law.image_python="3.10.8" LABEL law.image_python_mm="3.10" # law specific environment variables -ENV LAW_SANDBOX docker::riga/law:py310 -ENV LAW_IMAGE_NAME law-py310 -ENV LAW_IMAGE_TAG py310 +ENV LAW_SANDBOX docker::riga/law:c7-py310 +ENV LAW_IMAGE_NAME riga/law +ENV LAW_IMAGE_TAG c7-py310 ENV LAW_IMAGE_PYTHON_MAJOR 3 ENV LAW_IMAGE_PYTHON_MINOR 10 ENV LAW_IMAGE_PYTHON_PATCH 8 @@ -168,8 +167,5 @@ RUN git clone https://github.com/riga/law "${LAW_IMAGE_SOURCE_DIR}" && \ pip install --no-cache-dir . WORKDIR ${LAW_IMAGE_SOURCE_DIR} -# shell initialization -RUN echo 'source "$( law completion )" ""' >> /root/.bash_profile - # init command CMD bash --login diff --git a/docker/Dockerfile_centos7_py311 b/docker/Dockerfile_centos7_py311 index e2a53611..e73f0cdf 100644 --- a/docker/Dockerfile_centos7_py311 +++ b/docker/Dockerfile_centos7_py311 @@ -3,8 +3,7 @@ FROM centos:7 # labels LABEL law.version="0.1.8" LABEL law.image_name="riga/law" -LABEL law.image_tag="py311" -LABEL law.image_dir="law-py311" +LABEL law.image_tag="c7-py311" LABEL law.image_os="centos7" LABEL law.image_python_major="3" LABEL law.image_python_minor="11" @@ -13,9 +12,9 @@ LABEL law.image_python="3.11.0" LABEL law.image_python_mm="3.11" # law specific environment variables -ENV LAW_SANDBOX docker::riga/law:py311 -ENV LAW_IMAGE_NAME law-py311 -ENV LAW_IMAGE_TAG py311 +ENV LAW_SANDBOX docker::riga/law:c7-py311 +ENV LAW_IMAGE_NAME riga/law +ENV LAW_IMAGE_TAG c7-py311 ENV LAW_IMAGE_PYTHON_MAJOR 3 ENV LAW_IMAGE_PYTHON_MINOR 11 ENV LAW_IMAGE_PYTHON_PATCH 0 @@ -168,8 +167,5 @@ RUN git clone https://github.com/riga/law "${LAW_IMAGE_SOURCE_DIR}" && \ pip install --no-cache-dir . WORKDIR ${LAW_IMAGE_SOURCE_DIR} -# shell initialization -RUN echo 'source "$( law completion )" ""' >> /root/.bash_profile - # init command CMD bash --login diff --git a/docker/Dockerfile_centos7_py36 b/docker/Dockerfile_centos7_py36 index 62fd8cf5..4a212eab 100644 --- a/docker/Dockerfile_centos7_py36 +++ b/docker/Dockerfile_centos7_py36 @@ -3,8 +3,7 @@ FROM centos:7 # labels LABEL law.version="0.1.8" LABEL law.image_name="riga/law" -LABEL law.image_tag="py36" -LABEL law.image_dir="law-py36" +LABEL law.image_tag="c7-py36" LABEL law.image_os="centos7" LABEL law.image_python_major="3" LABEL law.image_python_minor="6" @@ -13,9 +12,9 @@ LABEL law.image_python="3.6.15" LABEL law.image_python_mm="3.6" # law specific environment variables -ENV LAW_SANDBOX docker::riga/law:py36 -ENV LAW_IMAGE_NAME law-py36 -ENV LAW_IMAGE_TAG py36 +ENV LAW_SANDBOX docker::riga/law:c7-py36,docker::riga/law:py36 +ENV LAW_IMAGE_NAME riga/law +ENV LAW_IMAGE_TAG c7-py36 ENV LAW_IMAGE_PYTHON_MAJOR 3 ENV LAW_IMAGE_PYTHON_MINOR 6 ENV LAW_IMAGE_PYTHON_PATCH 15 @@ -157,8 +156,5 @@ RUN git clone https://github.com/riga/law "${LAW_IMAGE_SOURCE_DIR}" && \ pip install --no-cache-dir . WORKDIR ${LAW_IMAGE_SOURCE_DIR} -# shell initialization -RUN echo 'source "$( law completion )" ""' >> /root/.bash_profile - # init command CMD bash --login diff --git a/docker/Dockerfile_centos7_py37 b/docker/Dockerfile_centos7_py37 index 1949bda2..dc0ceaca 100644 --- a/docker/Dockerfile_centos7_py37 +++ b/docker/Dockerfile_centos7_py37 @@ -3,8 +3,7 @@ FROM centos:7 # labels LABEL law.version="0.1.8" LABEL law.image_name="riga/law" -LABEL law.image_tag="py37" -LABEL law.image_dir="law-py37" +LABEL law.image_tag="c7-py37" LABEL law.image_os="centos7" LABEL law.image_python_major="3" LABEL law.image_python_minor="7" @@ -13,9 +12,9 @@ LABEL law.image_python="3.7.15" LABEL law.image_python_mm="3.7" # law specific environment variables -ENV LAW_SANDBOX docker::riga/law:py37 -ENV LAW_IMAGE_NAME law-py37 -ENV LAW_IMAGE_TAG py37 +ENV LAW_SANDBOX docker::riga/law:c7-py37 +ENV LAW_IMAGE_NAME riga/law +ENV LAW_IMAGE_TAG c7-py37 ENV LAW_IMAGE_PYTHON_MAJOR 3 ENV LAW_IMAGE_PYTHON_MINOR 7 ENV LAW_IMAGE_PYTHON_PATCH 15 @@ -157,8 +156,5 @@ RUN git clone https://github.com/riga/law "${LAW_IMAGE_SOURCE_DIR}" && \ pip install --no-cache-dir . WORKDIR ${LAW_IMAGE_SOURCE_DIR} -# shell initialization -RUN echo 'source "$( law completion )" ""' >> /root/.bash_profile - # init command CMD bash --login diff --git a/docker/Dockerfile_centos7_py38 b/docker/Dockerfile_centos7_py38 index b067977b..1eb33818 100644 --- a/docker/Dockerfile_centos7_py38 +++ b/docker/Dockerfile_centos7_py38 @@ -3,8 +3,7 @@ FROM centos:7 # labels LABEL law.version="0.1.8" LABEL law.image_name="riga/law" -LABEL law.image_tag="py38" -LABEL law.image_dir="law-py38" +LABEL law.image_tag="c7-py38" LABEL law.image_os="centos7" LABEL law.image_python_major="3" LABEL law.image_python_minor="8" @@ -13,9 +12,9 @@ LABEL law.image_python="3.8.15" LABEL law.image_python_mm="3.8" # law specific environment variables -ENV LAW_SANDBOX docker::riga/law:py38 -ENV LAW_IMAGE_NAME law-py38 -ENV LAW_IMAGE_TAG py38 +ENV LAW_SANDBOX docker::riga/law:c7-py38 +ENV LAW_IMAGE_NAME riga/law +ENV LAW_IMAGE_TAG c7-py38 ENV LAW_IMAGE_PYTHON_MAJOR 3 ENV LAW_IMAGE_PYTHON_MINOR 8 ENV LAW_IMAGE_PYTHON_PATCH 15 @@ -157,8 +156,5 @@ RUN git clone https://github.com/riga/law "${LAW_IMAGE_SOURCE_DIR}" && \ pip install --no-cache-dir . WORKDIR ${LAW_IMAGE_SOURCE_DIR} -# shell initialization -RUN echo 'source "$( law completion )" ""' >> /root/.bash_profile - # init command CMD bash --login diff --git a/docker/Dockerfile_centos7_py39 b/docker/Dockerfile_centos7_py39 index ee2ef72a..053ebcdc 100644 --- a/docker/Dockerfile_centos7_py39 +++ b/docker/Dockerfile_centos7_py39 @@ -3,19 +3,18 @@ FROM centos:7 # labels LABEL law.version="0.1.8" LABEL law.image_name="riga/law" -LABEL law.image_tag="py39" -LABEL law.image_dir="law-py39" +LABEL law.image_tag="c7-py39" LABEL law.image_os="centos7" LABEL law.image_python_major="3" LABEL law.image_python_minor="9" LABEL law.image_python_patch="15" -LABEL law.image_python="3.9.5" +LABEL law.image_python="3.9.15" LABEL law.image_python_mm="3.9" # law specific environment variables -ENV LAW_SANDBOX docker::riga/law:py39,docker::riga/law:py3,docker::riga/law:latest,docker::riga/law -ENV LAW_IMAGE_NAME law-py39 -ENV LAW_IMAGE_TAG py39 +ENV LAW_SANDBOX docker::riga/law:c7-py39,docker::riga/law:c7-py3 +ENV LAW_IMAGE_NAME riga/law +ENV LAW_IMAGE_TAG c7-py39 ENV LAW_IMAGE_PYTHON_MAJOR 3 ENV LAW_IMAGE_PYTHON_MINOR 9 ENV LAW_IMAGE_PYTHON_PATCH 15 @@ -157,8 +156,5 @@ RUN git clone https://github.com/riga/law "${LAW_IMAGE_SOURCE_DIR}" && \ pip install --no-cache-dir . WORKDIR ${LAW_IMAGE_SOURCE_DIR} -# shell initialization -RUN echo 'source "$( law completion )" ""' >> /root/.bash_profile - # init command CMD bash --login diff --git a/docker/Dockerfile_centos7_example b/docker/Dockerfile_example similarity index 100% rename from docker/Dockerfile_centos7_example rename to docker/Dockerfile_example diff --git a/docker/bashrc b/docker/bashrc index c524157a..384cbd62 100644 --- a/docker/bashrc +++ b/docker/bashrc @@ -1,3 +1,5 @@ #!/usr/bin/env bash [ -f "/etc/bashrc" ] && source "/etc/bashrc" "" + +source "$( law completion )" ""