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