Skip to content

Commit

Permalink
changes to make the container services more docker agnostic
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Marcy <[email protected]>
  • Loading branch information
gmarcy committed Sep 30, 2024
1 parent 78a26e2 commit 257c202
Show file tree
Hide file tree
Showing 19 changed files with 184 additions and 844 deletions.
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*.iml
LICENSE
README.md
docker_mirror_cache
docker_mirror_certs
registry_proxy_mirror_cache
registry_proxy_mirror_certs
.github
Makefile
63 changes: 37 additions & 26 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,51 @@
name: Create and publish a Docker image
name: Create and publish a container image

on:
push:
branches: ['main']

env:
GHCR_IO_USER: ${{ github.actor }}
GHCR_IO_TOKEN: ${{ github.token }}
DOCKER_IO_USER: ${{ secrets.DOCKER_IO_USER }}
DOCKER_IO_TOKEN: ${{ secrets.DOCKER_IO_TOKEN }}
REPO_NAME: ${{ github.repository }}

permissions:
contents: read
packages: write

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/[email protected]

- name: Set up QEMU
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/[email protected]

- name: Login to GHCR
uses: docker/[email protected]
with:
submodules: recursive
- name: Docker logins
run: |
docker login -u="$GHCR_IO_USER" -p="$GHCR_IO_TOKEN" ghcr.io
docker login -u="$DOCKER_IO_USER" -p="$DOCKER_IO_TOKEN" docker.io
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d-%H-%M-%S')" >> $GITHUB_OUTPUT
- name: Build the Docker image
run: |
docker build ./ --tag ghcr.io/$REPO_NAME:${{ steps.date.outputs.date }}
- name: Docker Push
run: |
docker push ghcr.io/$REPO_NAME:${{ steps.date.outputs.date }}
docker tag ghcr.io/$REPO_NAME:${{ steps.date.outputs.date }} ghcr.io/$REPO_NAME:latest
docker push ghcr.io/$REPO_NAME:latest
run: echo "date=$(date -u +'%Y-%m-%d-%H-%M-%S')" >> $GITHUB_OUTPUT

- name: Docker meta
id: metadata
uses: docker/[email protected]
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=raw,value=${{ steps.date.outputs.date }}
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push
uses: docker/[email protected]
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
16 changes: 0 additions & 16 deletions .github/workflows/mirror.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.idea
*.iml
**/docker_mirror_cache
**/docker_mirror_certs
**/registry_proxy_mirror_cache
**/registry_proxy_mirror_certs
100 changes: 0 additions & 100 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .releaserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tagFormat: v${version}
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/exec"
repositoryUrl: "[email protected]:coreweave/docker-registry-proxy.git"
repositoryUrl: "[email protected]:gmarcy/container-registry-proxy.git"
analyzeCommits:
- path: "@semantic-release/commit-analyzer"
releaseRules:
Expand Down
66 changes: 0 additions & 66 deletions Docker-Desktop-Windows.md

This file was deleted.

74 changes: 0 additions & 74 deletions Docker-for-Mac.md

This file was deleted.

Loading

0 comments on commit 257c202

Please sign in to comment.