Merge pull request #166 from cloudflare/fix-docker

Fix failing docker builds
This commit is contained in:
Łukasz Mierzwa
2017-08-09 11:34:05 -07:00
committed by GitHub
3 changed files with 10 additions and 23 deletions

View File

@@ -1,3 +0,0 @@
Dockerfile
Makefile
unsee

1
.dockerignore Symbolic link
View File

@@ -0,0 +1 @@
.gitignore

View File

@@ -1,14 +1,10 @@
FROM golang:1.8.3-alpine
FROM golang:1.8.3-alpine as unsee-builder
COPY . /go/src/github.com/cloudflare/unsee
ARG VERSION
RUN apk add --update make git nodejs
RUN make -C /go/src/github.com/cloudflare/unsee VERSION="${VERSION:-dev}"
RUN go install \
-ldflags "-X main.version=${VERSION:-dev}" \
github.com/cloudflare/unsee && \
rm -fr /go/src
FROM golang:1.8.3-alpine
COPY --from=unsee-builder /go/src/github.com/cloudflare/unsee/unsee /bin/unsee
EXPOSE 8080
CMD ["unsee"]

View File

@@ -45,17 +45,6 @@ used.
## Building and running
### Installing using the go command
unsee is go installable, so the easiest way is to run:
go install github.com/cloudflare/unsee
The `unsee` binary will be installed into `$GOPATH/bin` directory.
Note that this will build the latest master version which might not work with
your Alertmanager version. See
[supported Alertmanager versions](#supported-alertmanager-versions).
### Building from source
To clone git repo and build the binary yourself run:
@@ -67,6 +56,10 @@ To finally compile `unsee` the binary run:
make
Note that building locally from sources requires Go, nodejs and npm.
See Docker build options below for instructions on building from withing docker
container.
## Running
`unsee` is configured via environment variables or command line flags.