Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/trixie-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ name: 'trixie-dev'

on:
pull_request:
branches-ignore: [main]
paths:
- '.github/workflows/trixie-dev.yml'
- '.github/workflows/prek_checks.yml'
Expand All @@ -14,9 +13,10 @@ on:
workflow_dispatch:

env:
DESCRIPTION: 'Creative Commons (CC) Debian 13 (trixie) development'
DESCRIPTION: >-
'Creative Commons (CC) Debian 13 (trixie) with runint [development]'
OCI: 'org.opencontainers.image'
TITLE: 'CC Debian trixie (development)'
TITLE: 'CC Debian trixie [development]'
URL: 'https://github.com/creativecommons/containers/trixie'
VENDOR: 'Creative Commons'

Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:


# https://github.com/docker/build-push-action
- name: Build and push Docker trixie image to GHCR
- name: Build and push Docker image to GHCR
# build-push-action v7.4.0
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc
with:
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/trixie-msmtp-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
# https://docs.github.com/en/actions/reference/workflows-and-actions/variables
name: 'trixie-msmtp-dev'
# GHCR: GitHub Container Registry

on:
pull_request:
paths:
- '.github/workflows/trixie-msmtp-dev.yml'
- '.github/workflows/prek_checks.yml'
- 'trixie-msmtp/'
- '!trixie/README.md'
workflow_dispatch:

env:
DESCRIPTION: >-
'Creative Commons (CC) Debian 13 (trixie) with msmtp [development]'
OCI: 'org.opencontainers.image'
TITLE: 'CC Debian trixie with msmtp [development]'
URL: 'https://github.com/creativecommons/containers/trixie'
VENDOR: 'Creative Commons'

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:

prek_checks:
uses: $/.github/workflows/prek_checks.yml

build_and_push:
needs: prek_checks
permissions:
contents: read
packages: write
runs-on: ubuntu-latest

steps:

- parallel:

# https://github.com/docker/login-action
- name: Docker login to GitHub Container Registry (GHCR)
# docker/login-action v4.8.0
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# https://github.com/docker/metadata-action
- name: Docker extract metadata
id: docker_meta
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: index
# docker/metadata-action v6.2.0
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302
with:
annotations: |
${{ env.OCI }}.created={{ date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]' }}
${{ env.OCI }}.description=${{ env.DESCRIPTION }}
${{ env.OCI }}.source=${{ env.URL }}
${{ env.OCI }}.title=${{ env.TITLE }}
${{ env.OCI }}.url=${{ env.URL }}
${{ env.OCI }}.vendor=${{ env.VENDOR }}
images: ghcr.io/creativecommons/trixie-msmtp-dev
# https://specs.opencontainers.org/image-spec/annotations/
labels: |
${{ env.OCI }}.created={{ date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]' }}
${{ env.OCI }}.description=${{ env.DESCRIPTION }}
${{ env.OCI }}.source=${{ env.URL }}
${{ env.OCI }}.title=${{ env.TITLE }}
${{ env.OCI }}.url=${{ env.URL }}
${{ env.OCI }}.vendor=${{ env.VENDOR }}
tags: |
type=ref,event=pr,suffix=-{{ sha }}

# https://github.com/docker/setup-buildx-action
- name: Docker setup Buildx
id: docker_buildx
# docker/setup-buildx-action v4.4.1
uses: >-
docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069
with:
platforms: linux/amd64,linux/arm64

# https://github.com/actions/checkout
- name: GitHub checkout repository
# actions/checkout v7.0.1
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1


# https://github.com/docker/build-push-action
- name: Build and push Docker image to GHCR
# build-push-action v7.4.0
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc
with:
annotations: ${{ steps.docker_meta.outputs.annotations }}
builder: ${{ steps.docker_buildx.outputs.name }}
cache-from: type=gha
cache-to: type=gha,mode=max
context: trixie-msmtp
labels: ${{ steps.docker_meta.outputs.labels }}
platforms: ${{ steps.docker_buildx.outputs.platforms }}
provenance: false
push: true
sbom: false
tags: ${{ steps.docker_meta.outputs.tags }}
106 changes: 106 additions & 0 deletions .github/workflows/trixie-msmtp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
# https://docs.github.com/en/actions/reference/workflows-and-actions/variables
name: 'trixie-msmtp'
# GHCR: GitHub Container Registry

on:
push:
branches: [main]
paths:
- '.github/workflows/trixie-msmtp.yml'
- '.github/workflows/prek_checks.yml'
- 'trixie-msmtp/'
- '!trixie-msmtp/README.md'
workflow_dispatch:

env:
DESCRIPTION: 'Creative Commons (CC) Debian 13 (trixie) with msmtp'
OCI: 'org.opencontainers.image'
TITLE: 'CC Debian trixie with msmtp'
URL: 'https://github.com/creativecommons/containers/trixie-msmtp'
VENDOR: 'Creative Commons'

jobs:

prek_checks:
uses: $/.github/workflows/prek_checks.yml

build_and_push:
needs: prek_checks
permissions:
contents: read
packages: write
runs-on: ubuntu-latest

steps:

- parallel:

# https://github.com/docker/login-action
- name: Docker login to GitHub Container Registry (GHCR)
# docker/login-action v4.8.0
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# https://github.com/docker/metadata-action
- name: Docker extract metadata
id: docker_meta
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: index
# docker/metadata-action v6.2.0
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302
with:
annotations: |
${{ env.OCI }}.created={{ date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]' }}
${{ env.OCI }}.description=${{ env.DESCRIPTION }}
${{ env.OCI }}.source=${{ env.URL }}
${{ env.OCI }}.title=${{ env.TITLE }}
${{ env.OCI }}.url=${{ env.URL }}
${{ env.OCI }}.vendor=${{ env.VENDOR }}
images: ghcr.io/creativecommons/trixie-msmtp
# https://specs.opencontainers.org/image-spec/annotations/
labels: |
${{ env.OCI }}.created={{ date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]' }}
${{ env.OCI }}.description=${{ env.DESCRIPTION }}
${{ env.OCI }}.source=${{ env.URL }}
${{ env.OCI }}.title=${{ env.TITLE }}
${{ env.OCI }}.url=${{ env.URL }}
${{ env.OCI }}.vendor=${{ env.VENDOR }}
tags: |
type=raw,value={{date 'YYYYMMDD-HHmmss'}}
type=raw,priority=100,value=latest

# https://github.com/docker/setup-buildx-action
- name: Docker setup Buildx
id: docker_buildx
# docker/setup-buildx-action v4.4.1
uses: >-
docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069
with:
platforms: linux/amd64,linux/arm64

# https://github.com/actions/checkout
- name: GitHub checkout repository
# actions/checkout v7.0.1
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1


# https://github.com/docker/build-push-action
- name: Build and push Docker image to GHCR
# build-push-action v7.4.0
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc
with:
annotations: ${{ steps.docker_meta.outputs.annotations }}
builder: ${{ steps.docker_buildx.outputs.name }}
cache-from: type=gha
cache-to: type=gha,mode=max
context: trixie-msmtp
labels: ${{ steps.docker_meta.outputs.labels }}
platforms: ${{ steps.docker_buildx.outputs.platforms }}
provenance: false
push: true
sbom: false
tags: ${{ steps.docker_meta.outputs.tags }}
4 changes: 2 additions & 2 deletions .github/workflows/trixie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
workflow_dispatch:

env:
DESCRIPTION: 'Creative Commons (CC) Debian 13 (trixie)'
DESCRIPTION: 'Creative Commons (CC) Debian 13 (trixie) with runit'
OCI: 'org.opencontainers.image'
TITLE: 'CC Debian trixie'
URL: 'https://github.com/creativecommons/containers/trixie'
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:


# https://github.com/docker/build-push-action
- name: Build and push Docker trixie image to GHCR
- name: Build and push Docker image to GHCR
# build-push-action v7.4.0
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc
with:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/util-raw-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ name: 'util-raw-dev'

on:
pull_request:
branches-ignore: [main]
paths:
- '.github/workflows/util-raw-dev.yml'
- '.github/workflows/prek_checks.yml'
Expand All @@ -15,9 +14,9 @@ on:

env:
DESCRIPTION: >-
Simple utility that reports request headers received (development)
'Simple utility that reports request headers received [development]'
OCI: 'org.opencontainers.image'
TITLE: 'util-raw (development)'
TITLE: 'util-raw [development]'
URL: 'https://github.com/creativecommons/containers/util-raw'
VENDOR: 'Creative Commons'

Expand Down Expand Up @@ -93,7 +92,7 @@ jobs:


# https://github.com/docker/build-push-action
- name: Build and push Docker util-raw image to GHCR
- name: Build and push Docker image to GHCR
# build-push-action v7.4.0
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/util-raw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:


# https://github.com/docker/build-push-action
- name: Build and push Docker util-raw image to GHCR
- name: Build and push Docker image to GHCR
# build-push-action v7.4.0
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc
with:
Expand Down
16 changes: 14 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: cc

services:

# Creative Commons Debian 13 (trixie) slim
# Creative Commons Debian 13 (trixie) with runit
trixie:
build:
context: trixie
Expand All @@ -14,16 +14,28 @@ services:
entrypoint: /bin/true
image: trixie

# Creative Commons Debian 13 (trixie) with msmtp
trixie-msmtp:
build:
additional_contexts:
'ghcr.io/creativecommons/trixie:latest': 'service:trixie'
context: trixie-msmtp
# disable the entrypoint as the image is only being built locally for use
# by other services
entrypoint: /bin/true
image: trixie-msmtp

# Local development overlay
trixie-local:
build:
additional_contexts:
trixie: "service:trixie"
trixie-msmtp: "service:trixie-msmtp"
context: trixie-local
command: sh -c 'echo "CMD ignored? (this should NOT show up in console)"'
env_file: .env
image: trixie-local

# HTTP header mirror utility
util-raw:
build:
context: util-raw
Expand Down
2 changes: 1 addition & 1 deletion trixie-local/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# https://docs.docker.com/engine/reference/builder/

# hadolint ignore=DL3006
FROM trixie
FROM trixie-sys

# https://docs.docker.com/build/building/best-practices/#apt-get
# - apt and dpkg are configured in parent CC Debian trixie image
Expand Down
20 changes: 20 additions & 0 deletions trixie-msmtp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# https://docs.docker.com/engine/reference/builder/

# https://github.com/creativecommons/containers/pkgs/container/trixie
# hadolint ignore=DL3007
FROM ghcr.io/creativecommons/trixie:latest

# https://docs.docker.com/build/building/best-practices/#apt-get
# - apt and dpkg are configured in parent CC Debian trixie image
# - Retrieve new lists of packages, distribution upgrade, install new
# packages, erase downloaded archive files, and erase package lists
RUN set -o errexit -o nounset \
&& apt-get update --quiet \
&& apt-get dist-upgrade --quiet --yes \
&& apt-get install --quiet --yes \
msmtp-mta \
&& apt-get clean --quiet \
&& rm --recursive --force /var/lib/apt/lists/*

# msmtp configuration
COPY --parents conf.d/* /etc/container/
Loading