Skip to content

Commit d8eb4c4

Browse files
committed
first commit
0 parents  commit d8eb4c4

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/docker-build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build and Push Multi-Arch Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-push:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
steps:
17+
- name: Checkout source
18+
uses: actions/checkout@v4
19+
20+
- name: Set up QEMU
21+
uses: docker/setup-qemu-action@v3
22+
with:
23+
platforms: all
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3
27+
28+
- name: Log in to Docker Hub
29+
uses: docker/login-action@v3
30+
with:
31+
username: ${{ secrets.DOCKER_USERNAME }}
32+
password: ${{ secrets.DOCKER_PASSWORD }}
33+
34+
- name: Log in to GitHub Container Registry
35+
uses: docker/login-action@v3
36+
with:
37+
registry: ghcr.io
38+
username: ${{ github.actor }}
39+
password: ${{ secrets.GH_PAT }}
40+
41+
- name: Build and Push to Docker Hub and GHCR
42+
uses: docker/build-push-action@v5
43+
with:
44+
context: .
45+
push: true
46+
platforms: linux/amd64,linux/arm64
47+
tags: |
48+
${{ secrets.DOCKER_USERNAME }}/net-utils:latest
49+
ghcr.io/${{ github.repository_owner }}/net-utils:latest

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM alpine:latest
2+
3+
RUN apk update && apk add --no-cache \
4+
curl \
5+
netcat-openbsd \
6+
bind-tools \
7+
openssl \
8+
bash
9+
10+
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)