Skip to content
Draft
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
28 changes: 28 additions & 0 deletions .github/workflows/container-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Container Image

on:
push:
branches:
- main
pull_request: {}
release:
types:
- published

jobs:
container-image:
# Required by the base Container Image Action [^1].
# [^1]: https://github.com/Icinga/github-actions/blob/main/.github/workflows/container-image.yml#L54-L58
permissions:
contents: read
packages: write
attestations: write
id-token: write

name: Build and Public Container Image
uses: icinga/github-actions/.github/workflows/container-image.yml@main
with:
documentation_url: https://icinga.com/docs/icinga-notifications
secrets:
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
45 changes: 0 additions & 45 deletions .github/workflows/docker.yml

This file was deleted.

34 changes: 34 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Icinga Notifications | (c) 2023 Icinga GmbH | GPLv2+

FROM docker.io/library/golang AS base

WORKDIR /icinga-notifications
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download

FROM base AS build

# The source code must be mounted in read-write mode to allow the makefile to temporarily create the build artifacts
# in the source directory. These artifacts will then directly be deleted after the build process is finished.
RUN --mount=type=bind,source=.,target=.,rw \
--mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=0 make all && \
make test && \
make DESTDIR=/target install && \
make clean

FROM docker.io/library/alpine AS runtime

COPY --from=build /target /

RUN apk add tzdata

ARG username=notifications
RUN addgroup -g 1000 $username
RUN adduser -u 1000 -H -D -G $username $username
USER $username

EXPOSE 5680
CMD ["/usr/sbin/icinga-notifications"]
26 changes: 0 additions & 26 deletions Dockerfile

This file was deleted.

7 changes: 7 additions & 0 deletions doc/02-Installation.md.d/For-Container.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Installing Icinga Notifications in Containers

This image integrates Icinga Notifications into your containerized environment.

## Usage

TODO...
Loading