Fix docker file.
This commit is contained in:
@@ -1,19 +1,17 @@
|
|||||||
FROM golang:1.6-alpine
|
FROM golang:1.7-alpine
|
||||||
|
|
||||||
WORKDIR /go/src/app
|
WORKDIR /go/src/app
|
||||||
ENV ALLOW_CONTAINER_ROOT=1
|
|
||||||
|
|
||||||
COPY . /go/src/app
|
COPY . /go/src/app
|
||||||
RUN \
|
RUN \
|
||||||
apk add --no-cache git && \
|
apk add --no-cache git && \
|
||||||
go-wrapper download && \
|
go-wrapper download && \
|
||||||
go-wrapper install && \
|
go-wrapper install -ldflags "-X github.com/minio/minio/cmd.Version=2016-10-07T01:16:39Z -X github.com/minio/minio/cmd.ReleaseTag=RELEASE.2016-10-07T01-16-39Z -X github.com/minio/minio/cmd.CommitID=b06a514ce0cf10f1d4c8bbc7b5cdbd956c567ab9" && \
|
||||||
mkdir -p /export/docker && \
|
mkdir -p /export/docker && \
|
||||||
cp /go/src/app/docs/Docker.md /export/docker/ && \
|
cp /go/src/app/docs/Docker.md /export/docker/ && \
|
||||||
rm -rf /go/pkg /go/src && \
|
rm -rf /go/pkg /go/src && \
|
||||||
apk del git
|
apk del git
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
ENTRYPOINT ["go-wrapper", "run", "server"]
|
ENTRYPOINT ["go-wrapper", "run"]
|
||||||
VOLUME ["/export"]
|
VOLUME ["/export"]
|
||||||
CMD ["/export"]
|
|
||||||
|
|||||||
12
cmd/main.go
12
cmd/main.go
@@ -20,6 +20,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/minio/cli"
|
"github.com/minio/cli"
|
||||||
"github.com/minio/mc/pkg/console"
|
"github.com/minio/mc/pkg/console"
|
||||||
@@ -165,10 +166,13 @@ func Main() {
|
|||||||
|
|
||||||
// Do not print update messages, if quiet flag is set.
|
// Do not print update messages, if quiet flag is set.
|
||||||
if !globalQuiet {
|
if !globalQuiet {
|
||||||
// Do not print any errors in release update function.
|
if strings.HasPrefix(ReleaseTag, "RELEASE.") && c.Args().Get(0) != "update" {
|
||||||
noError := true
|
updateMsg, _, err := getReleaseUpdate(minioUpdateStableURL)
|
||||||
updateMsg := getReleaseUpdate(minioUpdateStableURL, noError)
|
if err != nil {
|
||||||
if updateMsg.Update {
|
// Ignore any errors during getReleaseUpdate(), possibly
|
||||||
|
// because of network errors.
|
||||||
|
return nil
|
||||||
|
}
|
||||||
console.Println(updateMsg)
|
console.Println(updateMsg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user