diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..dfca8bd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM golang:alpine as build +WORKDIR /go/src/github.com/ssllabs/ssllabs-scan +COPY . . +RUN apk --no-cache add git \ + && go get -u github.com/ssllabs/ssllabs-scan/... + +FROM alpine:latest +COPY --from=build /go/bin/ssllabs-scan /bin/ssllabs-scan +RUN apk update \ + && apk upgrade \ + && apk add --no-cache ca-certificates \ + && update-ca-certificates 2>/dev/null || true +ENTRYPOINT ["/bin/ssllabs-scan"] diff --git a/README.md b/README.md index 4966fd5..b42ba3a 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,44 @@ https://www.ssllabs.com/about/terms.html * Go >= 1.3 +## Installation + +### Prebuilt Binaries + +A [precompiled version is available](https://github.com/ssllabs/ssllabs-scan/releases) with each release. + +### Using Docker + +1. Build the [Docker](https://docs.docker.com/) image: + +```bash +sudo docker build -t ssllabs-scan https://github.com/ssllabs/ssllabs-scan.git +``` + +2. Run the Docker image: + +```bash +sudo docker run ssllabs-scan example.com +``` + +### From Source + +If you prefer to build your own binary from the latest release of the source code, make sure you have a correctly configured **Go >= 1.3** environment. More information about how to achieve this can be found [on the golang website.](https://golang.org/doc/install) Then, take the following steps: + +1. Download ssllabs-scan: + +```bash +go get -u github.com/ssllabs/ssllabs-scan/... +``` + +2. If you wish to rebuild the binaries from the source code: + +```bash +cd $GOPATH/src/github.com/ssllabs/ssllabs-scan + +go install ./... +``` + ## Usage SYNOPSIS @@ -46,9 +84,3 @@ OPTIONS ## Third-Party Tools and Libraries A list of libraries and tools that rely on the SSL Labs APIs can be found on the SSL Labs web site: https://www.ssllabs.com/projects/ssllabs-apis/ - -## Docker - -Docker images for this project are available at: - -* [https://github.com/jumanjihouse/docker-ssllabs-scan](https://github.com/jumanjihouse/docker-ssllabs-scan)