Skip to content

Commit c4efc67

Browse files
author
Matthew Fisher
committed
fix(publisher): use godeps
1 parent bf92c4c commit c4efc67

4 files changed

Lines changed: 6 additions & 19 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ logspout/build/
4747
logspout/image/logspout
4848
logspout/Godeps/
4949
publisher/Godeps/
50+
publisher/image/bin/publisher
5051
router/Godeps/
5152

5253
# coverage reports

publisher/Dockerfile

Lines changed: 0 additions & 12 deletions
This file was deleted.

publisher/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,14 @@ DOCKER_IMAGE := $(IMAGE_PREFIX)$(COMPONENT)
1212
BUILD_IMAGE := $(DOCKER_IMAGE)-build
1313
RELEASE_IMAGE := $(DOCKER_IMAGE):$(BUILD_TAG)
1414
REMOTE_IMAGE := $(REGISTRY)/$(RELEASE_IMAGE)
15+
BINARY_DEST_DIR = image/bin
1516

1617
build: check-docker
17-
cp -pR ../Godeps .
18-
docker build -t $(BUILD_IMAGE) .
19-
docker cp `docker run -d $(BUILD_IMAGE)`:/go/bin/publisher image/
18+
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 godep go build -a -v -ldflags '-s' -o $(BINARY_DEST_DIR)/publisher github.com/deis/deis/publisher || exit 1
2019
docker build -t $(RELEASE_IMAGE) image
21-
rm -rf image/publisher
2220

2321
clean: check-docker check-registry
24-
rm -rf Godeps
22+
rm -rf $(BINARY_DEST_DIR)
2523
docker rmi $(RELEASE_IMAGE) $(REMOTE_IMAGE)
2624

2725
full-clean: check-docker check-registry

publisher/image/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM scratch
1+
FROM ubuntu-debootstrap:14.04
22

3-
ADD publisher /usr/local/bin/publisher
3+
ADD bin/publisher /usr/local/bin/publisher
44
ENTRYPOINT ["/usr/local/bin/publisher"]
55

66
ENV DEIS_RELEASE 1.4.0-dev

0 commit comments

Comments
 (0)