diff --git a/Dockerfile b/Dockerfile index c8869be9..a6f62177 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,9 @@ WORKDIR /go/src/github.com/gophish/gophish COPY . . RUN go get -v && go build -v +# This build stage will be useful for compiling modified binary via docker container +FROM scratch AS binary +COPY --from=build-golang /go/src/github.com/gophish/gophish/gophish /gophish-modified-with-qr # Runtime container FROM debian:stable-slim diff --git a/build-binary-via-docker.sh b/build-binary-via-docker.sh new file mode 100755 index 00000000..bb2f1e87 --- /dev/null +++ b/build-binary-via-docker.sh @@ -0,0 +1,3 @@ +#!/bin/bash +echo "[*] Building the golang binary into the ./output directory " +docker image build --output "type=local,dest=$(pwd)/output" --target binary . diff --git a/output/gophish-modified-with-qr b/output/gophish-modified-with-qr new file mode 100755 index 00000000..6d2acf04 Binary files /dev/null and b/output/gophish-modified-with-qr differ