Skip to content

Commit d73d0c3

Browse files
committed
Add Dockerfile
1 parent 5051fee commit d73d0c3

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sx
2+
Dockerfile
3+
.dockerignore

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM golang:1.16-alpine as builder
2+
3+
RUN apk add --no-cache libpcap-dev libc-dev gcc linux-headers
4+
ADD . /app
5+
WORKDIR /app
6+
RUN go build -ldflags "-w -s" -o /sx
7+
8+
FROM alpine:3.13
9+
10+
RUN apk add libpcap
11+
COPY --from=builder /sx /sx
12+
13+
ENTRYPOINT ["/sx"]

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ From the root of the source tree, run:
3030
go build
3131
```
3232

33+
## Docker image
34+
35+
From the root of the source tree, run:
36+
37+
```
38+
docker build -t sx .
39+
```
40+
41+
Start docker container:
42+
43+
```
44+
docker run --rm --net host sx arp 192.168.0.1/24
45+
```
46+
3347
## Quick Start
3448

3549
Here's a quick examples showing how you can scan networks with `sx`.

0 commit comments

Comments
 (0)