diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ee3a0ad..0000000 --- a/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM golang:alpine - -COPY . /src -WORKDIR /src - -RUN apk --no-cache add git && \ - go get -d ./... && \ - apk del git - -# linux | windows | darwin -ENV OS linux -CMD GOOS=$OS GOARCH=386 go build -ldflags="-s -w" -o capture . && \ - chmod -R 777 capture && \ - go version diff --git a/README.md b/README.md index 56a8a2e..a4a055a 100644 --- a/README.md +++ b/README.md @@ -49,12 +49,14 @@ Manually: git clone https://github.com/ofabricio/capture.git cd capture - go get -d ./... go build -o capture . Via docker: git clone https://github.com/ofabricio/capture.git cd capture - docker build -t capture . - docker run --rm -v "${PWD}:/src" -e "OS=linux" capture + docker run --rm -v "${PWD}:/src" -w /src -e GOOS=darwin -e GOARCH=386 golang:latest go build -ldflags="-s -w" -o capture . + +Now you have an executable binary in your folder + +*Note:* you can change `GOOS=darwin` to _linux_ or _windows_