From 3d69c67bc765bdf3b985bc8e36b64175a056cc5b Mon Sep 17 00:00:00 2001 From: "aidan.hall34" Date: Fri, 13 Jan 2023 12:39:45 +0000 Subject: [PATCH] Added Dockerfile and updated README --- Dockerfile | 12 ++++++++++++ README.md | 14 ++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..220fa11 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:latest AS build-env +RUN go install github.com/rverton/webanalyze/cmd/webanalyze@latest +FROM alpine:latest +RUN apk add --no-cache libc6-compat +WORKDIR /app +COPY --from=build-env /go/bin/webanalyze . +RUN mkdir -p /app \ + && adduser -D webanalyze \ + && chown -R webanalyze:webanalyze /app +USER webanalyze +RUN ["./webanalyze", "-update"] +ENTRYPOINT ["./webanalyze"] \ No newline at end of file diff --git a/README.md b/README.md index 5ac7bd3..5b7f694 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,11 @@ This is a port of [Wappalyzer](https://github.com/AliasIO/Wappalyzer) in Go. Thi ## Installation and usage + +### Precompiled releases Precompiled releases can be downloaded directly [here](https://github.com/rverton/webanalyze/releases). +### Build If you want to build for yourself: $ go install -v github.com/rverton/webanalyze/cmd/webanalyze@latest @@ -34,6 +37,17 @@ If you want to build for yourself: The `-update` flags downloads a current version of `technologies.json` from the [wappalyzer repository](https://github.com/AliasIO/Wappalyzer) to the current folder. +### Docker + +```bash +# Clone the repo +git clone https://github.com/rverton/webanalyze.git +# Build the container +docker build -t webanalyze:latest webanalyze +# Run the container +docker run -it webanalyze:latest -h +``` + ## Development / Usage as a lib See `cmd/webanalyze/main.go` for an example on how to use this as a library.