diff --git a/.github/workflows/docker-all.yml b/.github/workflows/docker-all.yml new file mode 100644 index 0000000..99098df --- /dev/null +++ b/.github/workflows/docker-all.yml @@ -0,0 +1,13 @@ +name: Trigger Build and Publish All Images + +on: + workflow_dispatch: + +jobs: + exit: + runs-on: ubuntu-latest + + steps: + - name: Print + run: | + echo "This is a way to start multiple workflows from manually activating one" diff --git a/.github/workflows/docker-arch.yml b/.github/workflows/docker-arch.yml new file mode 100644 index 0000000..43fa0cf --- /dev/null +++ b/.github/workflows/docker-arch.yml @@ -0,0 +1,58 @@ +name: Arch Linux + +on: + workflow_dispatch: + workflow_run: + workflows: ["Trigger Build and Publish All Images"] + types: + - completed + push: + paths: + - arch/** + +jobs: + build-and-push-arch-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + env: + IMAGE_NAME_WITH_TAG: ghcr.io/${{ github.repository_owner }}/root:latest-arch + + steps: + - name: Print Image name with tag(s) + run: | + echo "Image name with tag: ${{ env.IMAGE_NAME_WITH_TAG }}" + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the GitHub Container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GHCR_WRITE_TOKEN }} + + - name: Build and Push Image + uses: docker/build-push-action@v2 + with: + context: arch/ + pull: true + push: false + tags: ${{ env.IMAGE_NAME_WITH_TAG }} + labels: | + org.opencontainers.image.source=https://github.com/${{ github.repository }} + + - name: root version + run: | + export ROOT_VERSION=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} root-config --version | sed -r 's/\//./g') + echo "ROOT_VERSION=$ROOT_VERSION" >> $GITHUB_ENV + echo "ROOT_VERSION=$ROOT_VERSION" + + - name: Add additional tag to image and push it + run: | + export IMAGE_NAME_WITH_NEW_TAG=ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION }}-arch + docker tag ${{ env.IMAGE_NAME_WITH_TAG }} $IMAGE_NAME_WITH_NEW_TAG + docker push $IMAGE_NAME_WITH_NEW_TAG diff --git a/.github/workflows/docker-centos.yml b/.github/workflows/docker-centos.yml new file mode 100644 index 0000000..2502b13 --- /dev/null +++ b/.github/workflows/docker-centos.yml @@ -0,0 +1,61 @@ +name: CentOS 7 + +on: + workflow_dispatch: + workflow_run: + workflows: ["Trigger Build and Publish All Images"] + types: + - completed + push: + paths: + - centos7/** + +jobs: + build-and-push-centos-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + env: + IMAGE_NAME_WITH_TAG: ghcr.io/${{ github.repository_owner }}/root:latest-centos + + steps: + - name: Print Image name with tag(s) + run: | + echo "Image name with tag: ${{ env.IMAGE_NAME_WITH_TAG }}" + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the GitHub Container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GHCR_WRITE_TOKEN }} + + - name: Build and Push Image + uses: docker/build-push-action@v2 + with: + context: centos7/ + pull: true + push: false + tags: ${{ env.IMAGE_NAME_WITH_TAG }} + labels: | + org.opencontainers.image.source=https://github.com/${{ github.repository }} + + - name: root version and OS version + run: | + export ROOT_VERSION=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} root-config --version | sed -r 's/\//./g') + echo "ROOT_VERSION=$ROOT_VERSION" >> $GITHUB_ENV + echo "ROOT_VERSION=$ROOT_VERSION" + export OS_VERSION_ID=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} cat /etc/os-release | grep VERSION_ID | sed -r 's/VERSION_ID=//g' | sed -r 's/"//g') + echo "OS_VERSION_ID=$OS_VERSION_ID" >> $GITHUB_ENV + echo "OS_VERSION_ID=$OS_VERSION_ID" + + - name: Add additional tag to image and push it + run: | + export IMAGE_NAME_WITH_NEW_TAG=ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION }}-centos${{ env.OS_VERSION_ID }} + docker tag ${{ env.IMAGE_NAME_WITH_TAG }} $IMAGE_NAME_WITH_NEW_TAG + docker push $IMAGE_NAME_WITH_NEW_TAG diff --git a/.github/workflows/docker-conda.yml b/.github/workflows/docker-conda.yml new file mode 100644 index 0000000..87f856d --- /dev/null +++ b/.github/workflows/docker-conda.yml @@ -0,0 +1,58 @@ +name: Conda + +on: + workflow_dispatch: + workflow_run: + workflows: ["Trigger Build and Publish All Images"] + types: + - completed + push: + paths: + - conda/** + +jobs: + build-and-push-conda-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + env: + IMAGE_NAME_WITH_TAG: ghcr.io/${{ github.repository_owner }}/root:latest-conda + + steps: + - name: Print Image name with tag(s) + run: | + echo "Image name with tag: ${{ env.IMAGE_NAME_WITH_TAG }}" + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the GitHub Container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GHCR_WRITE_TOKEN }} + + - name: Build and Push Image + uses: docker/build-push-action@v2 + with: + context: conda/ + pull: true + push: false + tags: ${{ env.IMAGE_NAME_WITH_TAG }} + labels: | + org.opencontainers.image.source=https://github.com/${{ github.repository }} + + - name: root version + run: | + export ROOT_VERSION=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} root-config --version | sed -r 's/\//./g') + echo "ROOT_VERSION=$ROOT_VERSION" >> $GITHUB_ENV + echo "ROOT_VERSION=$ROOT_VERSION" + + - name: Add additional tag to image and push it + run: | + export IMAGE_NAME_WITH_NEW_TAG=ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION }}-conda + docker tag ${{ env.IMAGE_NAME_WITH_TAG }} $IMAGE_NAME_WITH_NEW_TAG + docker push $IMAGE_NAME_WITH_NEW_TAG diff --git a/.github/workflows/docker-fedora.yml b/.github/workflows/docker-fedora.yml new file mode 100644 index 0000000..0529f3c --- /dev/null +++ b/.github/workflows/docker-fedora.yml @@ -0,0 +1,57 @@ +name: Fedora + +on: + workflow_dispatch: + workflow_run: + workflows: ["Trigger Build and Publish All Images"] + types: + - completed + push: + paths: + - fedora/** + +jobs: + build-and-push-fedora-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + env: + IMAGE_NAME_WITH_TAG: ghcr.io/${{ github.repository_owner }}/root:latest-fedora + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the GitHub Container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GHCR_WRITE_TOKEN }} + + - name: Build and Push Image + uses: docker/build-push-action@v2 + with: + context: fedora/ + pull: true + push: false + tags: ${{ env.IMAGE_NAME_WITH_TAG }} + labels: | + org.opencontainers.image.source=https://github.com/${{ github.repository }} + + - name: root version and OS version + run: | + export ROOT_VERSION=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} root-config --version | sed -r 's/\//./g') + echo "ROOT_VERSION=$ROOT_VERSION" >> $GITHUB_ENV + echo "ROOT_VERSION=$ROOT_VERSION" + export OS_VERSION_ID=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} cat /etc/os-release | grep VERSION_ID | sed -r 's/VERSION_ID=//g' | sed -r 's/"//g') + echo "OS_VERSION_ID=$OS_VERSION_ID" >> $GITHUB_ENV + echo "OS_VERSION_ID=$OS_VERSION_ID" + + - name: Add additional tag to image and push it + run: | + export IMAGE_NAME_WITH_NEW_TAG=ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION }}-fedora${{ env.OS_VERSION_ID }} + docker tag ${{ env.IMAGE_NAME_WITH_TAG }} $IMAGE_NAME_WITH_NEW_TAG + docker push $IMAGE_NAME_WITH_NEW_TAG diff --git a/.github/workflows/docker-gentoo.yml b/.github/workflows/docker-gentoo.yml new file mode 100644 index 0000000..8293391 --- /dev/null +++ b/.github/workflows/docker-gentoo.yml @@ -0,0 +1,58 @@ +name: Gentoo + +on: + workflow_dispatch: + workflow_run: + workflows: ["Trigger Build and Publish All Images"] + types: + - completed + push: + paths: + - gentoo/** + +jobs: + build-and-push-gentoo-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + env: + IMAGE_NAME_WITH_TAG: ghcr.io/${{ github.repository_owner }}/root:latest-gentoo + + steps: + - name: Print Image name with tag(s) + run: | + echo "Image name with tag: ${{ env.IMAGE_NAME_WITH_TAG }}" + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the GitHub Container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GHCR_WRITE_TOKEN }} + + - name: Build and Push Image + uses: docker/build-push-action@v2 + with: + context: gentoo/ + pull: true + push: false + tags: ${{ env.IMAGE_NAME_WITH_TAG }} + labels: | + org.opencontainers.image.source=https://github.com/${{ github.repository }} + + - name: root version + run: | + export ROOT_VERSION=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} root-config --version | sed -r 's/\//./g') + echo "ROOT_VERSION=$ROOT_VERSION" >> $GITHUB_ENV + echo "ROOT_VERSION=$ROOT_VERSION" + + - name: Add additional tag to image and push it + run: | + export IMAGE_NAME_WITH_NEW_TAG=ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION }}-gentoo + docker tag ${{ env.IMAGE_NAME_WITH_TAG }} $IMAGE_NAME_WITH_NEW_TAG + docker push $IMAGE_NAME_WITH_NEW_TAG diff --git a/.github/workflows/docker-ubuntu-from-source.yml b/.github/workflows/docker-ubuntu-from-source.yml new file mode 100644 index 0000000..e736e4d --- /dev/null +++ b/.github/workflows/docker-ubuntu-from-source.yml @@ -0,0 +1,57 @@ +name: Ubuntu (from source) + +on: + workflow_dispatch: + inputs: + root-version-major: + required: true + description: ROOT Major version number (string) according to **Major.Minor.Patch** schema + default: "6" + root-version-minor: + required: true + description: ROOT Minor version number (string) according to **Major.Minor.Patch** schema + default: "26" + root-version-patch: + required: true + description: ROOT Patch version number (string) according to **Major.Minor.Patch** schema + default: "02" + push: + paths: + - ubuntu_from_source/** + +jobs: + build-and-push-ubuntu-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + env: + ROOT_VERSION_STRING: ${{ github.event.inputs.root-version-major }}.${{ github.event.inputs.root-version-minor }}.${{ github.event.inputs.root-version-patch }} + + steps: + - name: Print Image name with tag(s) + run: | + echo "Image name with tag: ${{ env.IMAGE_NAME_WITH_TAG }}" + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the GitHub Container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GHCR_WRITE_TOKEN }} + + - name: Build and Push Image + uses: docker/build-push-action@v2 + with: + context: ubuntu_from_source/ + pull: true + push: true + build-args: | + ROOT_VERSION=${{ env.ROOT_VERSION_STRING }} + tags: ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION_STRING }}-ubuntu-from-source + labels: | + org.opencontainers.image.source=https://github.com/${{ github.repository }} diff --git a/.github/workflows/docker-ubuntu.yml b/.github/workflows/docker-ubuntu.yml new file mode 100644 index 0000000..d25bb52 --- /dev/null +++ b/.github/workflows/docker-ubuntu.yml @@ -0,0 +1,61 @@ +name: Ubuntu + +on: + workflow_dispatch: + workflow_run: + workflows: ["Trigger Build and Publish All Images"] + types: + - completed + push: + paths: + - ubuntu/** + +jobs: + build-and-push-ubuntu-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + env: + IMAGE_NAME_WITH_TAG: ghcr.io/${{ github.repository_owner }}/root:latest-ubuntu + + steps: + - name: Print Image name with tag(s) + run: | + echo "Image name with tag: ${{ env.IMAGE_NAME_WITH_TAG }}" + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log in to the GitHub Container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GHCR_WRITE_TOKEN }} + + - name: Build and Push Image + uses: docker/build-push-action@v2 + with: + context: ubuntu/ + pull: true + push: false + tags: ${{ env.IMAGE_NAME_WITH_TAG }} + labels: | + org.opencontainers.image.source=https://github.com/${{ github.repository }} + + - name: root version and OS version + run: | + export ROOT_VERSION=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} root-config --version | sed -r 's/\//./g') + echo "ROOT_VERSION=$ROOT_VERSION" >> $GITHUB_ENV + echo "ROOT_VERSION=$ROOT_VERSION" + export OS_VERSION_ID=$(docker run ${{ env.IMAGE_NAME_WITH_TAG }} cat /etc/os-release | grep VERSION_ID | sed -r 's/VERSION_ID=//g' | sed -r 's/"//g') + echo "OS_VERSION_ID=$OS_VERSION_ID" >> $GITHUB_ENV + echo "OS_VERSION_ID=$OS_VERSION_ID" + + - name: Add additional tag to image and push it + run: | + export IMAGE_NAME_WITH_NEW_TAG=ghcr.io/${{ github.repository_owner }}/root:${{ env.ROOT_VERSION }}-ubuntu${{ env.OS_VERSION_ID }} + docker tag ${{ env.IMAGE_NAME_WITH_TAG }} $IMAGE_NAME_WITH_NEW_TAG + docker push $IMAGE_NAME_WITH_NEW_TAG diff --git a/README.md b/README.md index e882d69..10d03e6 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ Where to get help: [the ROOT forum](https://root-forum.cern.ch/) ## Supported tags and respective Dockerfile links -* [`latest`](https://github.com/root-project/root-docker/blob/6.26.00-ubuntu20.04/ubuntu/Dockerfile) -> [`6.26.02-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.26.02-ubuntu20.04/ubuntu/Dockerfile), [`6.26.00-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.26.00-ubuntu20.04/ubuntu/Dockerfile), [`6.24.06-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.24.06-ubuntu20.04/ubuntu/Dockerfile), [`6.24.02-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.24.02-ubuntu20.04/ubuntu/Dockerfile), [`6.24.00-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.24.00-ubuntu20.04/ubuntu/Dockerfile), [`6.22.08-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.22.08-ubuntu20.04/ubuntu/Dockerfile), [`6.22.06-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.22.06-ubuntu20.04/ubuntu/Dockerfile), [`6.22.02-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.22.02-ubuntu20.04/ubuntu/Dockerfile), [`6.22.00-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.22.00-ubuntu20.04/ubuntu/Dockerfile), [`6.20.08-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.20.08-ubuntu20.04/ubuntu/Dockerfile) -* [`6.26.02-ubuntu22.04`](https://github.com/root-project/root-docker/blob/6.26.02-ubuntu22.04/ubuntu/Dockerfile) +* [`latest`](https://github.com/root-project/root-docker/blob/6.26.02-ubuntu22.04/ubuntu/Dockerfile) -> [`6.26.02-ubuntu22.04`](https://github.com/root-project/root-docker/blob/6.26.02-ubuntu22.04/ubuntu/Dockerfile) +* [`6.26.02-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.26.02-ubuntu20.04/ubuntu/Dockerfile), [`6.26.00-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.26.00-ubuntu20.04/ubuntu/Dockerfile), [`6.24.06-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.24.06-ubuntu20.04/ubuntu/Dockerfile), [`6.24.02-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.24.02-ubuntu20.04/ubuntu/Dockerfile), [`6.24.00-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.24.00-ubuntu20.04/ubuntu/Dockerfile), [`6.22.08-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.22.08-ubuntu20.04/ubuntu/Dockerfile), [`6.22.06-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.22.06-ubuntu20.04/ubuntu/Dockerfile), [`6.22.02-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.22.02-ubuntu20.04/ubuntu/Dockerfile), [`6.22.00-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.22.00-ubuntu20.04/ubuntu/Dockerfile), [`6.20.08-ubuntu20.04`](https://github.com/root-project/root-docker/blob/6.20.08-ubuntu20.04/ubuntu/Dockerfile) * [`6.26.00-conda`](https://github.com/root-project/root-docker/blob/6.26.00-conda/conda/Dockerfile), [`6.24.06-conda`](https://github.com/root-project/root-docker/blob/6.24.06-conda/conda/Dockerfile), [`6.24.02-conda`](https://github.com/root-project/root-docker/blob/6.24.02-conda/conda/Dockerfile), [`6.24.00-conda`](https://github.com/root-project/root-docker/blob/6.24.00-conda-3/conda/Dockerfile), [`6.22.08-conda`](https://github.com/root-project/root-docker/blob/6.22.08-conda/conda/Dockerfile), [`6.22.06-conda`](https://github.com/root-project/root-docker/blob/6.22.06-conda/conda/Dockerfile), [`6.22.02-conda`](https://github.com/root-project/root-docker/blob/6.22.02-conda/conda/Dockerfile), [`6.22.00-conda`](https://github.com/root-project/root-docker/blob/6.22.00-conda/conda/Dockerfile) * [`6.26.00-arch`](https://github.com/root-project/root-docker/blob/6.26.00-arch/arch/Dockerfile), [`6.24.06-arch`](https://github.com/root-project/root-docker/blob/6.24.06-arch/arch/Dockerfile), [`6.24.02-arch`](https://github.com/root-project/root-docker/blob/6.24.02-arch/arch/Dockerfile), [`6.24.00-arch`](https://github.com/root-project/root-docker/blob/6.24.00-arch/arch/Dockerfile), [`6.22.06-arch`](https://github.com/root-project/root-docker/blob/6.22.06-arch/arch/Dockerfile), [`6.22.02-arch`](https://github.com/root-project/root-docker/blob/6.22.02-arch/arch/Dockerfile), [`6.22.00-arch`](https://github.com/root-project/root-docker/blob/6.22.00-arch/conda/Dockerfile), [`6.20.06-arch`](https://github.com/root-project/root-docker/blob/6.20.06-arch/arch/Dockerfile) * [`6.24.06-fedora35`](https://github.com/root-project/root-docker/blob/6.24.06-fedora35/fedora/Dockerfile) @@ -18,15 +18,14 @@ Where to get help: [the ROOT forum](https://root-forum.cern.ch/) ### Supported C++ standards -Different images provide different compilers and a ROOT installation built with different C++ standards. +It is important to compile ROOT applications with the same C++ standard as ROOT itself was compiled with. +Different images provide ROOT installations built with different C++ standards. Here is a breakdown by tag: -The `latest` tag and the `*-ubuntu20.04` tags (starting from ROOT 6.24) have C++14 support: their ROOT is compiled with that C++ standard. - -Tags `*-arch`, `*-conda` and `*-fedora34` have C++17 support. - -Tags `*-fedora3[2,3]` have C++14 support. - -Tags `*-ubuntu20.04` (up to ROOT 6.22) and `*-centos7` come with ROOT compiled with C++11 support. +- `latest`, `ubuntu22.04`: C++17 support +- `ubuntu22.04` (starting from ROOT 6.24): C+14 +- `arch`, `conda`, `fedora34`, `fedora35`: C++17 +- `fedora32`, `fedora33`: C++14 +- `ubuntu20.04` (up to ROOT 6.22), `centos7`: C++11 ## Getting started @@ -84,3 +83,9 @@ docker run --rm -it -e DISPLAY=10.0.75.1:0 rootproject/root ## Examples [See GitHub for example Dockerfiles.](https://github.com/root-project/docker-examples) + +## Reproducibility of these images + +Even though for each image we link to the Dockerfile that produced it, in several cases running that same exact Dockerfile will _not_ result in an image identical to the one we offer. Sometimes it will even result in an image with a more recent ROOT version: this is the case for images based on rolling Linux distributions such as Arch, for example. + +The `*_from_source` recipes, on the other hand, are expected to be fully reproducible. \ No newline at end of file