Skip to content

Commit 6970dac

Browse files
committed
add docker file
1 parent 9a10bb0 commit 6970dac

3 files changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/docker.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
docker:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
steps:
17+
- name: Checkout Repository
18+
uses: actions/checkout@v4
19+
20+
- name: Login to GitHub Container Registry
21+
uses: docker/login-action@v3
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Build and Push Docker Image
28+
uses: docker/build-push-action@v5
29+
with:
30+
context: .
31+
push: true
32+
tags: ghcr.io/${{ github.repository }}:latest

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM alpine:latest
2+
3+
RUN apk add --no-cache \
4+
bash \
5+
bind-tools \
6+
netcat-openbsd \
7+
curl
8+
9+
WORKDIR /app
10+
11+
COPY . .
12+
13+
RUN chmod +x sni-scanner.sh
14+
15+
CMD ["bash", "sni-scanner.sh"]

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
services:
2+
sni-scanner:
3+
build: .
4+
container_name: sni-scanner
5+
stdin_open: true
6+
tty: true

0 commit comments

Comments
 (0)