From f2620bb98cce41821fcd97b86beb65ed25753810 Mon Sep 17 00:00:00 2001 From: Oliver Sterzel Date: Sun, 26 Jun 2016 23:32:26 +0100 Subject: [PATCH] Revert "Make the clam-rest container tiny" This reverts commit d6a9b30ea1e157a9d0ca7db76f66cb9c9e144440. --- Dockerfile | 11 ++++++++--- Makefile | 1 - scripts/build-static-binary | 3 --- 3 files changed, 8 insertions(+), 7 deletions(-) delete mode 100755 scripts/build-static-binary diff --git a/Dockerfile b/Dockerfile index bc97478..322bf76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,12 @@ -FROM scratch +FROM golang:1.3 -ADD target/clamrest / +ADD . /go/src/github.com/osterzel/clamrest -CMD ["/clamrest"] +WORKDIR /go/src/github.com/osterzel/clamrest +RUN go get +RUN go install github.com/osterzel/clamrest +RUN rm -rf /go/src/github.com/osterzel/clamrest + +ENTRYPOINT /go/bin/clamrest EXPOSE 8080 diff --git a/Makefile b/Makefile index 88c83e7..175d68b 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,6 @@ run-container: .clamav build-container @docker run -d -p 9000:9000 -e PORT=9000 --name $(SERVICE) --link clamd:clamd $(SERVICE):$(VERSION) build-container: - docker run --rm -t -i -v $(shell pwd):/go/src/github.com/osterzel/clamrest -v $(shell pwd)/target:/go/bin golang:1.3 /bin/bash -c "/go/src/github.com/osterzel/clamrest/scripts/build-static-binary" docker build -t $(SERVICE):$(VERSION) . run-slug: .clamav build-slug diff --git a/scripts/build-static-binary b/scripts/build-static-binary deleted file mode 100755 index 89aaa39..0000000 --- a/scripts/build-static-binary +++ /dev/null @@ -1,3 +0,0 @@ -cd /go/src/github.com/osterzel/clamrest -go get -CGO_ENABLED=0 GOOS=linux go install -a -installsuffix cgo