-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit - moved from https://github.com/brettinternet/homelab
- Loading branch information
0 parents
commit c5e8e17
Showing
25 changed files
with
697 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Build and publish bash image | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- bash/* | ||
- .github/workflows/publish-bash.yaml | ||
|
||
env: | ||
DOCKER_USERNAME: brettinternet | ||
IMAGE_NAME: bash | ||
DESCRIPTION: An Alpine image for scripting with bash, curl and git using a dumb-init entrypoint | ||
|
||
defaults: | ||
run: | ||
working-directory: ./bash | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'skipci')" | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: arm64,amd64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PAT }} | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract image metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }} | ||
ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }} | ||
flavor: latest=auto | ||
tags: type=raw,value=latest,enable={{is_default_branch}} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./${{ env.IMAGE_NAME }} | ||
file: ./${{ env.IMAGE_NAME }}/Dockerfile | ||
platforms: arm64,amd64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: | | ||
org.opencontainers.image.name=${{ env.IMAGE_NAME }} | ||
org.opencontainers.image.source=https://github.com/brettinternet/containers/tree/main/${{ env.IMAGE_NAME }} | ||
org.opencontainers.image.description=${{ env.DESCRIPTION }} | ||
org.opencontainers.image.licenses=MIT | ||
- name: Update Docker Hub Description | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PAT }} | ||
repository: ${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }} | ||
short-description: ${{ env.DESCRIPTION }} | ||
readme-filepath: ./${{ env.IMAGE_NAME }}/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Build and publish cgit image | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- cgit/* | ||
- .github/workflows/publish-cgit.yaml | ||
|
||
env: | ||
DOCKER_USERNAME: brettinternet | ||
IMAGE_NAME: cgit | ||
DESCRIPTION: A git web frontend | ||
|
||
defaults: | ||
run: | ||
working-directory: ./cgit | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'skipci')" | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: arm64,amd64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PAT }} | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract image metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }} | ||
ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }} | ||
flavor: latest=auto | ||
tags: type=raw,value=latest,enable={{is_default_branch}} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./${{ env.IMAGE_NAME }} | ||
file: ./${{ env.IMAGE_NAME }}/Dockerfile | ||
platforms: arm64,amd64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: | | ||
org.opencontainers.image.name=${{ env.IMAGE_NAME }} | ||
org.opencontainers.image.source=https://github.com/brettinternet/containers/tree/main/${{ env.IMAGE_NAME }} | ||
org.opencontainers.image.description=${{ env.DESCRIPTION }} | ||
org.opencontainers.image.licenses=MIT | ||
- name: Update Docker Hub Description | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PAT }} | ||
repository: ${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }} | ||
short-description: ${{ env.DESCRIPTION }} | ||
readme-filepath: ./${{ env.IMAGE_NAME }}/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Build and publish node image | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- node/* | ||
- .github/workflows/publish-node.yaml | ||
|
||
env: | ||
DOCKER_USERNAME: brettinternet | ||
IMAGE_NAME: node | ||
DESCRIPTION: An Alpine image for scripting with node and git using a dumb-init entrypoint | ||
|
||
defaults: | ||
run: | ||
working-directory: ./node | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'skipci')" | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: arm64,amd64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PAT }} | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract image metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }} | ||
ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }} | ||
flavor: latest=auto | ||
tags: type=raw,value=latest,enable={{is_default_branch}} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./${{ env.IMAGE_NAME }} | ||
file: ./${{ env.IMAGE_NAME }}/Dockerfile | ||
platforms: arm64,amd64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: | | ||
org.opencontainers.image.name=${{ env.IMAGE_NAME }} | ||
org.opencontainers.image.source=https://github.com/brettinternet/containers/tree/main/${{ env.IMAGE_NAME }} | ||
org.opencontainers.image.description=${{ env.DESCRIPTION }} | ||
org.opencontainers.image.licenses=MIT | ||
- name: Update Docker Hub Description | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PAT }} | ||
repository: ${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }} | ||
short-description: ${{ env.DESCRIPTION }} | ||
readme-filepath: ./${{ env.IMAGE_NAME }}/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages | ||
# TODO: specify package README https://github.com/docker/build-push-action/issues/722 | ||
name: Build and publish snapraid image | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- snapraid/* | ||
- .github/workflows/publish-snapraid.yaml | ||
|
||
env: | ||
DOCKER_USERNAME: brettinternet | ||
IMAGE_NAME: snapraid | ||
DESCRIPTION: Snapraid backup program for disk arrays and python script runner for automation | ||
|
||
defaults: | ||
run: | ||
working-directory: ./snapraid | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'skipci')" | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
with: | ||
platforms: arm64,amd64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PAT }} | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract image metadata | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }} | ||
ghcr.io/${{ github.actor }}/${{ env.IMAGE_NAME }} | ||
flavor: latest=auto | ||
tags: type=raw,value=latest,enable={{is_default_branch}} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./${{ env.IMAGE_NAME }} | ||
file: ./${{ env.IMAGE_NAME }}/Dockerfile | ||
platforms: arm64,amd64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: | | ||
org.opencontainers.image.name=${{ env.IMAGE_NAME }} | ||
org.opencontainers.image.source=https://github.com/brettinternet/containers/tree/main/${{ env.IMAGE_NAME }} | ||
org.opencontainers.image.description=${{ env.DESCRIPTION }} | ||
org.opencontainers.image.licenses=MIT | ||
- name: Update Docker Hub Description | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ env.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_PAT }} | ||
repository: ${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }} | ||
short-description: ${{ env.DESCRIPTION }} | ||
readme-filepath: ./${{ env.IMAGE_NAME }}/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Trash | ||
.DS_Store | ||
Thumbs.db | ||
tmp | ||
|
||
# scripts | ||
node_modules | ||
*.log | ||
*.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Containers | ||
|
||
Hosted images for my homelab. | ||
|
||
See usage in [homelab](https://github.com/brettinternet/homelab) and [provision](https://github.com/brettinternet/provision). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM bash:alpine3.16 | ||
|
||
RUN apk --update add git curl jq dumb-init | ||
|
||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Bash | ||
|
||
An Alpine image for scripting with bash, curl, jq and git using a dumb-init entrypoint. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# https://wiki.alpinelinux.org/wiki/Cgit | ||
# Alternate option: https://git.causal.agency/cgit-pink/tree/cgit.css | ||
FROM alpine:latest | ||
|
||
RUN set -xe && \ | ||
apk add --no-cache --purge -uU \ | ||
curl git cgit py3-pygments python3 py3-markdown markdown \ | ||
fcgiwrap spawn-fcgi nginx gettext dumb-init && \ | ||
rm -rf /var/cache/apk/* /tmp/* && \ | ||
mkdir -p /srv/git | ||
|
||
ENV ROOT_TITLE="Git" ROOT_DESC="My git repositories" SECTION_FROM_STARTPATH=0 MAX_REPO_COUNT=50 NOPLAINEMAIL=1 | ||
COPY --chown=nginx cgit.png /usr/share/webapps/cgit/ | ||
COPY --chown=nginx favicon.ico /usr/share/webapps/cgit/ | ||
COPY cgitrc.template /etc/ | ||
COPY nginx.conf /etc/nginx/ | ||
COPY start.sh /start.sh | ||
|
||
VOLUME /var/lib/git /var/cache/cgit | ||
EXPOSE 80 | ||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] | ||
CMD ["/start.sh"] |
Oops, something went wrong.