From 98a0a87426699b11a675f25ce262b1cb6a5556fe Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Fri, 28 Jun 2019 22:30:05 +0200 Subject: [PATCH] Small fixes --- .dockerignore | 1 - Dockerfile | 4 ++-- README.md | 2 +- main.go | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.dockerignore b/.dockerignore index 4c4db84..22c768f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,4 @@ .git/ readme/ docker-compose.yml -.travis.yml README.md \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 1189498..f041478 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,9 +46,9 @@ FROM builder AS server COPY go.mod go.sum ./ RUN go mod download COPY *.go ./ -#RUN go test -v +#RUN go test -v -race ./... RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-s -w" -o app . -RUN upx -v --best --ultra-brute --overlay=strip app && upx -t app +RUN [ "${BINCOMPRESS}" == "" ] || (upx -v --best --lzma --overlay=strip app && upx -t app) FROM final COPY --from=stackedit --chown=1000 /stackedit/dist /html diff --git a/README.md b/README.md index 8ff482f..23d8c7c 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ - [Stackedit features](https://github.com/benweet/stackedit/blob/master/README.md#stackedit-can) - Lightweight image based on: - - [Stackedit 5.13.2](https://github.com/benweet/stackedit) + - [Stackedit 5.13.3](https://github.com/benweet/stackedit) - [Scratch](https://hub.docker.com/_/scratch) - Golang simple HTTP static server - Running without root diff --git a/main.go b/main.go index 8563b23..20c8735 100644 --- a/main.go +++ b/main.go @@ -69,7 +69,7 @@ func healthcheck(listeningPort string) { fmt.Println("Can't build HTTP request") os.Exit(1) } - client := &http.Client{Timeout: time.Duration(1000) * time.Millisecond} + client := &http.Client{Timeout: 1 * time.Second} response, err := client.Do(request) if err != nil { fmt.Println("Can't execute HTTP request")