Skip to content

Commit

Permalink
Drop multi-stage Dockerfile (for now)
Browse files Browse the repository at this point in the history
Drop multi-stage Dockerfile for now (not widely supported yet), and
simplify the regular single-stage Dockerfile and build process.
  • Loading branch information
anguslees committed Jun 5, 2017
1 parent 17c0e5d commit 935fb3f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
/controller.image
/*-static
/controller.yaml
/docker/controller
9 changes: 0 additions & 9 deletions Dockerfile

This file was deleted.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ controller: $(GO_FILES)
ksonnet-seal: $(GO_FILES)
$(GO) build -o $@ $(GO_FLAGS) ./cmd/ksonnet-seal

%-static: $(GO_FILES)
CGO_ENABLED=0 $(GO) build -o $@ -installsuffix cgo $(GO_FLAGS) ./cmd/$*
docker/controller: $(GO_FILES)
CGO_ENABLED=0 $(GO) build -o $@ -installsuffix cgo $(GO_FLAGS) ./cmd/controller

controller.image: Dockerfile.single controller-static
$(DOCKER) build -f Dockerfile.single -t $(CONTROLLER_IMAGE) .
controller.image: docker/Dockerfile docker/controller
$(DOCKER) build -t $(CONTROLLER_IMAGE) docker/
#$(DOCKER) image inspect $(CONTROLLER_IMAGE) -f '$(shell echo $(CONTROLLER_IMAGE) | cut -d: -f1)@{{.Id}}' > $@.tmp
echo $(CONTROLLER_IMAGE) >$@.tmp
mv $@.tmp $@
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.single → docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM alpine
MAINTAINER Angus Lees <gus@inodes.org>
COPY controller-static /usr/local/bin/controller
COPY controller /usr/local/bin/

CMD ["controller", "--logtostderr"]

0 comments on commit 935fb3f

Please sign in to comment.