Skip to content

Commit

Permalink
docs,ci(ct-base): add and push README description to Docker Hub IQSS#…
Browse files Browse the repository at this point in the history
…8932

When pushing to Docker Hub from development, we now also push
a short description with disclaimers, links to docs and license hints.
  • Loading branch information
poikilotherm committed Nov 8, 2022
1 parent 5d77ab9 commit fbfcaa4
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/container_base_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ on:
paths:
- 'modules/container-base/**'
- 'modules/dataverse-parent/pom.xml'
- '.github/workflows/container_base_push.yml'
pull_request:
branches:
- 'develop'
- 'master'
paths:
- 'modules/container-base/**'
- 'modules/dataverse-parent/pom.xml'
- '.github/workflows/container_base_push.yml'

env:
IMAGE_TAG: develop
Expand Down Expand Up @@ -53,18 +55,31 @@ jobs:
- name: Build base container image with local architecture
run: mvn -f modules/container-base -Pct package

- if: ${{ github.event_name != 'pull_request' }} # run only if this is not a pull request - PRs have no access to secrets
# Run anything below only if this is not a pull request.
# Accessing, pushing tags etc. to DockerHub will only succeed in upstream because secrets.

- if: ${{ github.event_name != 'pull_request' && github.ref == 'develop' }}
name: Push description to DockerHub
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: gdcc/base
short-description: "Dataverse Base Container image providing Payara application server and optimized configuration"
readme-filepath: ./modules/container-base/README.md

- if: ${{ github.event_name != 'pull_request' }}
name: Log in to the Container registry
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- if: ${{ github.event_name != 'pull_request' }} # run only if this is not a pull request - multi-arch makes no sense with PR
- if: ${{ github.event_name != 'pull_request' }}
name: Set up QEMU for multi-arch builds
uses: docker/setup-qemu-action@v2
- name: Re-set image tag based on branch
if: ${{ github.ref == 'master' }}
run: echo "IMAGE_TAG=release"
- if: ${{ github.event_name != 'pull_request' }} # run only if this is not a pull request - tag push will only succeed in upstream
- if: ${{ github.event_name != 'pull_request' }}
name: Deploy multi-arch base container image to Docker Hub
run: mvn -f modules/container-base -Pct deploy -Dbase.image.tag=${{ env.IMAGE_TAG }} -Ddocker.registry=${{ env.REGISTRY }}
56 changes: 56 additions & 0 deletions modules/container-base/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Dataverse Base Container Image

A "base image" offers you a pre-installed and pre-tuned application server to deploy Dataverse software to.
Adding basic functionality like executing scripts at container boot, monitoring, memory tweaks etc is all done
at this layer, to make the application image focus on the app itself.

## Quick Reference

**Maintained by:**

This image is created, maintained and supported by the Dataverse community on a best-effort basis.

**Where to find documentation:**

The [Dataverse Container Guide - Base Image](https://guides.dataverse.org/en/latest/container/base-image.html)
provides in-depth information about content, building, tuning and so on for this image.

**Where to get help and ask questions:**

IQSS will not offer you support how to deploy or run it, please reach out to the community for help on using it.
You can join the Community Chat on Matrix at https://chat.dataverse.org or the Community Slack at
https://dataversecommunity.slack.com to ask for help and guidance.

## Supported Image Tags

This image is sourced within the main upstream code [repository of the Dataverse software](https://github.com/IQSS/dataverse).
Development and maintenance happens there (again, by the community). Community supported image tags are based on the two
most important branches:

- `develop` representing the unstable state of affairs in Dataverse's development branch
([`Dockerfile`](https://github.com/IQSS/dataverse/tree/develop/modules/container-base/src/main/docker/Dockerfile))
- `release` representing the latest stable release in Dataverse's main branch
([`Dockerfile`](https://github.com/IQSS/dataverse/tree/master/modules/container-base/src/main/docker/Dockerfile))

Within the main repository, you may find the base image's files at `<git root>/modules/container-base`.
This Maven module uses the `Maven Docker Plugin <https://dmp.fabric8.io>`_ to build and ship the image.
You may use, extend, or alter this image to your liking and/or host in some different registry if you want to.

**Supported architectures:** This image is created as a "multi-arch image", supporting the most common architectures
Dataverse usually runs on: AMD64 (Windows/Linux/...) and ARM64 (Apple M1/M2).

## License

Image content created by the community is licensed under [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0),
like the [main Dataverse project](https://github.com/IQSS/dataverse/blob/develop/LICENSE.md).

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.

As with all Docker images, all images likely also contain other software which may be under other licenses (such as
[Payara Server](https://github.com/payara/Payara/blob/master/LICENSE.txt), Bash, etc from the base
distribution, along with any direct or indirect (Java) dependencies contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies
with any relevant licenses for all software contained within.

0 comments on commit fbfcaa4

Please sign in to comment.