2021-02-17 12:53:15 -05:00
|
|
|
# Local registry
|
|
|
|
|
2022-10-07 13:16:42 -04:00
|
|
|
For testing purposes you may need to create a [local registry](https://hub.docker.com/_/registry)
|
|
|
|
to push images into:
|
2021-02-17 12:53:15 -05:00
|
|
|
|
|
|
|
```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
|
2022-05-28 12:36:30 -04:00
|
|
|
uses: actions/checkout@v3
|
2021-02-17 12:53:15 -05:00
|
|
|
-
|
|
|
|
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
|
|
|
|
```
|