forked from aceberg/WatchYourLAN
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
aceberg
committed
Aug 17, 2022
1 parent
9e812e0
commit 13f4082
Showing
6 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM ubuntu:20.04 | ||
|
||
RUN apt update && apt install -y arp-scan && apt clean \ | ||
&& mkdir /data | ||
|
||
COPY templates /app/templates | ||
COPY watchyourlan /app/ | ||
|
||
EXPOSE 8840 | ||
|
||
WORKDIR /app | ||
|
||
ENTRYPOINT ["./watchyourlan"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,32 @@ | ||
DUSER=aceberg | ||
DNAME=watchyourlan | ||
DPORT=8840 | ||
VERSION=0.4 | ||
|
||
mod: | ||
rm go.mod | ||
go mod init watchyourlan | ||
go mod init $(DNAME) | ||
go mod tidy | ||
|
||
run: | ||
go run . | ||
build: | ||
go build . | ||
sudo go run . | ||
|
||
go-build: | ||
go build . | ||
|
||
docker-build: | ||
docker build -t $(DUSER)/$(DNAME):latest -t $(DUSER)/$(DNAME):$(VERSION) . | ||
|
||
docker-run: | ||
docker rm wyl || true | ||
docker run --name wyl \ | ||
-e "IFACE=virbr-bw" \ | ||
--network="host" \ | ||
-v ~/.dockerdata/wyl:/data \ | ||
$(DUSER)/$(DNAME):$(VERSION) | ||
|
||
clean: | ||
rm $(DNAME) || true | ||
docker rmi -f $(DUSER)/$(DNAME):latest $(DUSER)/$(DNAME):$(VERSION) | ||
|
||
dev: go-build docker-build docker-run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.