From 9e53aed1744b62f010b33a2149ffc6e5b497770a Mon Sep 17 00:00:00 2001 From: Boot-Error Date: Sat, 12 Oct 2019 05:29:18 +0530 Subject: [PATCH 1/2] Run wtf inside docker container To build the container docker build -t wtfutil . To run wtf docker run -it wtfutil --- Dockerfile | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 24ebafa6..e9c65388 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,17 @@ -FROM scratch -COPY wtfutil / -ENTRYPOINT ["/wtfutil"] +FROM golang:1.13-alpine + +RUN apk add --no-cache make ncurses + +COPY . $GOPATH/src/github.com/wtfutil/wtf + +ENV GOPROXY=https://gocenter.io +ENV GO111MODULE=on +ENV GOSUMDB=off + +WORKDIR $GOPATH/src/github.com/wtfutil/wtf + +ENV PATH=$PATH:./bin + +RUN make build + +ENTRYPOINT "wtfutil" From f5e0aec6b63972e9d2975ca135237c776bcbad1e Mon Sep 17 00:00:00 2001 From: Boot-Error Date: Sat, 12 Oct 2019 06:34:52 +0530 Subject: [PATCH 2/2] Updated README.md with instruction to run in docker --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 524738d7..db0f32fa 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,21 @@ make run **Note:** WTF is _only_ compatible with Go versions **1.11.0** or later (due to the use of Go modules). If you would like to use `gccgo` to compile, you _must_ use `gccgo-9` or later which introduces support for Go modules. +## Install and run in Docker + +You can run `wtf` inside a docker container + +```bash +# download the source +git clone https://github.com/wtfutil/wtf + +# build the docker container +docker build -t wtfutil . + +# run the container +docker run -it wtfutil +``` + ## Communication ### Slack