2021-02-17 12:53:15 -05:00
|
|
|
# Local registry
|
|
|
|
|
|
|
|
For testing purposes you may need to create a [local registry](https://hub.docker.com/_/registry) to push images into:
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
name: ci
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-01-18 08:57:27 -05:00
|
|
|
- 'main'
|
2021-02-17 12:53:15 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
-
|
|
|
|
name: Set up QEMU
|
2022-05-05 13:24:32 -04:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2021-02-17 12:53:15 -05:00
|
|
|
-
|
|
|
|
name: Set up Docker Buildx
|
2022-05-05 13:24:32 -04:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2021-02-17 12:53:15 -05:00
|
|
|
with:
|
|
|
|
driver-opts: network=host
|
|
|
|
-
|
|
|
|
name: Build and push to local registry
|
2022-05-05 13:24:32 -04:00
|
|
|
uses: docker/build-push-action@v3
|
2021-02-17 12:53:15 -05:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
|
|
|
tags: localhost:5000/name/app:latest
|
|
|
|
-
|
|
|
|
name: Inspect
|
|
|
|
run: |
|
|
|
|
docker buildx imagetools inspect localhost:5000/name/app:latest
|
|
|
|
```
|