Skip to content

Commit

Permalink
chore: extracted docker notice to separate files (TRG 4.06)
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-rm-meyer-ISST committed Feb 22, 2024
1 parent fbe130a commit d8f31b2
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 182 deletions.
116 changes: 58 additions & 58 deletions .github/workflows/build-image-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,70 +24,70 @@
name: Build - Docker image Backend (SemVer)

on:
push:
branches:
- main
# trigger events for SemVer like tags
tags:
- 'v*.*.*'
- 'v*.*.*-*'
pull_request:
branches:
- main
push:
branches:
- main
# trigger events for SemVer like tags
tags:
- 'v*.*.*'
- 'v*.*.*-*'
pull_request:
branches:
- main

env:
IMAGE_NAMESPACE: "tractusx"
IMAGE_NAME: "app-puris-backend"
IMAGE_NAMESPACE: "tractusx"
IMAGE_NAME: "app-puris-backend"

jobs:
docker:
if: github.repository_owner == 'eclipse-tractusx' # prevent running on forks
runs-on: ubuntu-latest
permissions:
packages: write
docker:
if: github.repository_owner == 'eclipse-tractusx' # prevent running on forks
runs-on: ubuntu-latest
permissions:
packages: write

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

# Create SemVer or ref tags dependent of trigger event
- name: Docker meta
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0
with:
images: |
${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
tags: |
# set latest tag for main branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }},event=pr
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
# Create SemVer or ref tags dependent of trigger event
- name: Docker meta
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0
with:
images: |
${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
tags: |
# set latest tag for main branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }},event=pr
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
- name: DockerHub login
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: DockerHub login
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 #v5.1
with:
context: ./backend
file: ./backend/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 #v5.1
with:
context: ./backend
file: ./backend/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# https://github.com/peter-evans/dockerhub-description
- name: Update Docker Hub description
if: github.event_name != 'pull_request'
uses: peter-evans/dockerhub-description@dc67fad7001ef9e8e3c124cb7a64e16d0a63d864 #v3.4.2
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
readme-filepath: ./backend/README.md
# https://github.com/peter-evans/dockerhub-description
- name: Update Docker Hub description
if: github.event_name != 'pull_request'
uses: peter-evans/dockerhub-description@dc67fad7001ef9e8e3c124cb7a64e16d0a63d864 #v3.4.2
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
readme-filepath: ./backend/DOCKER_NOTICE.md
116 changes: 58 additions & 58 deletions .github/workflows/build-image-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,70 +24,70 @@
name: Build - Docker image Frontend (SemVer)

on:
push:
branches:
- main
# trigger events for SemVer like tags
tags:
- 'v*.*.*'
- 'v*.*.*-*'
pull_request:
branches:
- main
push:
branches:
- main
# trigger events for SemVer like tags
tags:
- 'v*.*.*'
- 'v*.*.*-*'
pull_request:
branches:
- main

env:
IMAGE_NAMESPACE: "tractusx"
IMAGE_NAME: "app-puris-frontend"
IMAGE_NAMESPACE: "tractusx"
IMAGE_NAME: "app-puris-frontend"

jobs:
docker:
if: github.repository_owner == 'eclipse-tractusx' # prevent running on forks
runs-on: ubuntu-latest
permissions:
packages: write
docker:
if: github.repository_owner == 'eclipse-tractusx' # prevent running on forks
runs-on: ubuntu-latest
permissions:
packages: write

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

# Create SemVer or ref tags dependent of trigger event
- name: Docker meta
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0
with:
images: |
${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
tags: |
# set latest tag for main branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }},event=pr
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
# Create SemVer or ref tags dependent of trigger event
- name: Docker meta
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0
with:
images: |
${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
tags: |
# set latest tag for main branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }},event=pr
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
- name: DockerHub login
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: DockerHub login
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 #v5.1
with:
context: ./frontend
file: ./frontend/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 #v5.1
with:
context: ./frontend
file: ./frontend/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# https://github.com/peter-evans/dockerhub-description
- name: Update Docker Hub description
if: github.event_name != 'pull_request'
uses: peter-evans/dockerhub-description@dc67fad7001ef9e8e3c124cb7a64e16d0a63d864 #v3.4.2
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
readme-filepath: ./frontend/README.md
# https://github.com/peter-evans/dockerhub-description
- name: Update Docker Hub description
if: github.event_name != 'pull_request'
uses: peter-evans/dockerhub-description@dc67fad7001ef9e8e3c124cb7a64e16d0a63d864 #v3.4.2
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
readme-filepath: ./frontend/DOCKER_NOTICE.md
31 changes: 3 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,7 @@ For details on the licensing terms, see the `LICENSE` file.

## Notice for Docker Image

This application provides container images for demonstration purposes.
Below you can find the information regarding Docker Notice for this frontend.

Eclipse Tractus-X product(s) installed within the image:

- GitHub: https://github.com/eclipse-tractusx/puris
- Project home: https://projects.eclipse.org/projects/automotive.tractusx
- Dockerfiles:
- Frontend: https://github.com/eclipse-tractusx/puris/blob/main/frontend/Dockerfile
- Backend: https://github.com/eclipse-tractusx/puris/blob/main/backend/Dockerfile
- Project license: [Apache License, Version 2.0](https://github.com/eclipse-tractusx/puris/blob/main/LICENSE)

**Used Base Image [Frontend]**

`nginxinc/nginx-unprivileged:alpine`

- DockerHub: https://hub.docker.com/r/nginxinc/nginx-unprivileged
- GitHub project: https://github.com/nginxinc/docker-nginx-unprivileged

**Used Base Image [Backend]**
`eclipse-temurin:17-jre-alpine`

- DockerHub: https://hub.docker.com/_/eclipse-temurin
- GitHub project: https://github.com/adoptium/containers

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc
from the base distribution, along with any direct or indirect dependencies of the primary software being 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.
- [Frontend](./frontend/DOCKER_NOTICE.md)
- [Backend](./backend/DOCKER_NOTICE.md)
20 changes: 20 additions & 0 deletions backend/DOCKER_NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
This application provides container images for demonstration purposes.

Eclipse Tractus-X product(s) installed within the image:

- GitHub: https://github.com/eclipse-tractusx/puris
- Project home: https://projects.eclipse.org/projects/automotive.tractusx
- Dockerfile Backend: https://github.com/eclipse-tractusx/puris/blob/main/backend/Dockerfile
- Project license: [Apache License, Version 2.0](https://github.com/eclipse-tractusx/puris/blob/main/backend/LICENSE)

**Used Base Image [Backend]**
`eclipse-temurin:17-jre-alpine`

- DockerHub: https://hub.docker.com/_/eclipse-temurin
- GitHub project: https://github.com/adoptium/containers

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc
from the base distribution, along with any direct or indirect dependencies of the primary software being 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.
21 changes: 2 additions & 19 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,6 @@ For details on the licensing terms, see the `LICENSE` file.

## Notice for Docker Image

This application provides container images for demonstration purposes.
Below you can find the information regarding Docker Notice for this frontend.

Eclipse Tractus-X product(s) installed within the image:

- GitHub: https://github.com/eclipse-tractusx/puris
- Project home: https://projects.eclipse.org/projects/automotive.tractusx
- Dockerfile Backend: https://github.com/eclipse-tractusx/puris/blob/main/backend/Dockerfile
- Project license: [Apache License, Version 2.0](https://github.com/eclipse-tractusx/puris/blob/main/backend/LICENSE)

**Used Base Image [Backend]**
`eclipse-temurin:17-jre-alpine`

- DockerHub: https://hub.docker.com/_/eclipse-temurin
- GitHub project: https://github.com/adoptium/containers

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc
from the base distribution, along with any direct or indirect dependencies of the primary software being 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.
[Backend](./DOCKER_NOTICE.md)
20 changes: 20 additions & 0 deletions frontend/DOCKER_NOTICE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
This application provides container images for demonstration purposes.

Eclipse Tractus-X product(s) installed within the image:

- GitHub: https://github.com/eclipse-tractusx/puris
- Project home: https://projects.eclipse.org/projects/automotive.tractusx
- Dockerfile Frontend: https://github.com/eclipse-tractusx/puris/blob/main/frontend/Dockerfile
- Project license: [Apache License, Version 2.0](https://github.com/eclipse-tractusx/puris/blob/main/frontend/LICENSE)

**Used Base Image [Frontend]**
`nginxinc/nginx-unprivileged:alpine`

- DockerHub: https://hub.docker.com/r/nginxinc/nginx-unprivileged
- GitHub project: https://github.com/nginxinc/docker-nginx-unprivileged

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc
from the base distribution, along with any direct or indirect dependencies of the primary software being 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.
21 changes: 2 additions & 19 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,6 @@ For details on the licensing terms, see the `LICENSE` file.

## Notice for Docker Image

This application provides container images for demonstration purposes.
Below you can find the information regarding Docker Notice for this frontend.

Eclipse Tractus-X product(s) installed within the image:

- GitHub: https://github.com/eclipse-tractusx/puris
- Project home: https://projects.eclipse.org/projects/automotive.tractusx
- Dockerfile Frontend: https://github.com/eclipse-tractusx/puris/blob/main/frontend/Dockerfile
- Project license: [Apache License, Version 2.0](https://github.com/eclipse-tractusx/puris/blob/main/frontend/LICENSE)

**Used Base Image [Frontend]**
`nginxinc/nginx-unprivileged:alpine`

- DockerHub: https://hub.docker.com/r/nginxinc/nginx-unprivileged
- GitHub project: https://github.com/nginxinc/docker-nginx-unprivileged

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc
from the base distribution, along with any direct or indirect dependencies of the primary software being 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.
[Frontend](./DOCKER_NOTICE.md)

0 comments on commit d8f31b2

Please sign in to comment.