https://github.com/wengchaoxi/docker-library
A collection of docker library images.
https://github.com/wengchaoxi/docker-library
Last synced: 2 months ago
JSON representation
A collection of docker library images.
- Host: GitHub
- URL: https://github.com/wengchaoxi/docker-library
- Owner: wengchaoxi
- License: mit
- Created: 2023-03-04T09:00:56.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-05T07:09:01.000Z (7 months ago)
- Last Synced: 2025-02-05T11:49:13.713Z (4 months ago)
- Language: Dockerfile
- Homepage: https://hub.docker.com/u/wengchaoxi
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker-library
A collection of docker library images.
## Template
```sh
├── .github/workflows
│ ├── ...
│ └── example.yml
├── ...
└── example
├── ...
└── Dockerfile
```### example.yml
```yaml
# See: https://github.com/wengchaoxi/docker-libraryname: Build and push `example` docker image
on:
workflow_dispatch:
push:
branches:
- main
paths:
- example/**
- .github/workflows/example.yml
pull_request:
branches:
- main
paths:
- example/**jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true- name: Set up qemu
uses: docker/setup-qemu-action@v1- name: Set up docker buildx
uses: docker/setup-buildx-action@v1- name: Login to docker hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}- name: Login to github package registry
env:
username: ${{ github.repository_owner }}
# https://github.com/settings/tokens/new?scopes=write:packages
password: ${{ secrets.GHCR_TOKEN }}
run: echo ${{ env.password }} | docker login ghcr.io -u ${{ env.username }} --password-stdin- name: Build and push docker image
uses: docker/build-push-action@v2
with:
file: example/Dockerfile
platforms: linux/amd64
context: example
push: ${{ github.ref == 'refs/heads/main' }}
tags: |
${{ secrets.DOCKER_USERNAME }}/example:latest
ghcr.io/${{ github.repository_owner }}/example:latest
```