Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Commit 6613304

Browse files
committed
move to ghcr
1 parent 0ce762a commit 6613304

File tree

5 files changed

+67
-17
lines changed

5 files changed

+67
-17
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "docker"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"

.github/workflows/dockerimage.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/image.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# GitHub recommends pinning actions to a commit SHA.
7+
# To get a newer version, you will need to update the SHA.
8+
# You can also reference a tag or branch, but the action may change without warning.
9+
---
10+
name: Create and publish a Container image
11+
12+
on:
13+
push:
14+
branches:
15+
- master
16+
17+
env:
18+
REGISTRY: ghcr.io
19+
IMAGE_NAME: resmo/nip-io
20+
21+
jobs:
22+
build-and-push-image:
23+
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read
26+
packages: write
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v3
31+
32+
- name: Log in to the Container registry
33+
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
34+
with:
35+
registry: ${{ env.REGISTRY }}
36+
username: ${{ github.actor }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Extract metadata (tags, labels) for Docker
40+
id: meta
41+
uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea
42+
with:
43+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
44+
45+
- name: Build and push Docker image
46+
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
47+
with:
48+
context: .
49+
push: true
50+
pull: true
51+
tags: ${{ steps.meta.outputs.tags }}
52+
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM bitnami/minideb:latest
2+
23
RUN install_packages python pdns-server pdns-backend-pipe
34
ADD src/backend.conf.example /usr/local/bin/backend.conf
45
ADD src/nip.py /usr/local/bin/nip

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ See https://github.com/resmo/nip.io/blob/master/src/backend.conf.example for an
3030

3131
### As Docker Container
3232

33-
34-
#### Run the Container from DcokerHub:
33+
#### Run the Container from ghcr:
3534

3635
```bash
37-
docker run -d -p 0.0.0.0:53:53/tcp -p 0.0.0.0:53:53/udp -v /data/backend.conf:/usr/local/bin/backend.conf --name nip.io resmo/nip-io
36+
docker run -d -p 0.0.0.0:53:53/tcp -p 0.0.0.0:53:53/udp -v /data/backend.conf:/usr/local/bin/backend.conf --name nip.io ghcr.io/resmo/nip-io
3837
```
3938

4039
#### Or Build the Image:
@@ -51,6 +50,7 @@ docker logs -f nip.io
5150
```
5251

5352
#### Test it
53+
5454
```bash
5555
dig 1-2-3-4.example.com +short @localhost
5656
1.2.3.4

0 commit comments

Comments
 (0)