Skip to content

Commit 13cabc0

Browse files
author
Matthew Fisher
committed
Merge pull request #2778 from aledbf/fix_router_godeps
ref(router): change structure to allow the update of go dependencies
2 parents 2d6ba4e + 3a6f145 commit 13cabc0

25 files changed

Lines changed: 45 additions & 44 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ docs/docs.zip
4343
logspout/build/
4444
logspout/Godeps/
4545
publisher/Godeps/
46-
router/parent/Godeps/
46+
router/Godeps/
4747

4848
# coverage reports
4949
.coverage

router/Dockerfile

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
1-
FROM ubuntu-debootstrap:14.04
1+
FROM golang:1.3
22

3-
ENV DEBIAN_FRONTEND noninteractive
3+
ADD firewall /tmp/firewall
44

5-
# install common packages
6-
RUN apt-get update && apt-get install -y curl net-tools sudo
5+
ADD build.sh /go/src/github.com/deis/deis/router/build.sh
76

8-
# install confd
9-
RUN curl -sSL -o /usr/local/bin/confd https://s3-us-west-2.amazonaws.com/opdemand/confd-git-b8e693c \
10-
&& chmod +x /usr/local/bin/confd
7+
WORKDIR /go/src/github.com/deis/deis/router
118

12-
# install common packages
13-
RUN apt-get update && apt-get install -y libgeoip1
9+
RUN DOCKER_BUILD=true /go/src/github.com/deis/deis/router/build.sh
1410

15-
WORKDIR /app
11+
RUN tar -C /opt/nginx -czf /nginx.tgz .
1612

17-
EXPOSE 80 2222
13+
RUN go get github.com/tools/godep
1814

19-
CMD ["/app/bin/boot"]
15+
ADD . /go/src/github.com/deis/deis/router/
2016

21-
ADD . /app
17+
RUN CGO_ENABLED=0 godep go build -a -ldflags '-s' boot.go
2218

23-
ADD nginx.tgz /opt/nginx
24-
25-
RUN rm nginx.tgz
19+
RUN cp /go/src/github.com/deis/deis/router/boot /go/bin/boot

router/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ DEV_IMAGE = $(DEV_REGISTRY)/$(IMAGE)
66
BUILD_IMAGE = $(COMPONENT)-build
77

88
build: check-docker
9-
cp -pR ../Godeps parent/
10-
docker build -t $(BUILD_IMAGE) parent
11-
docker cp `docker run -d $(BUILD_IMAGE)`:/nginx.tgz `pwd`
12-
docker cp `docker run -d $(BUILD_IMAGE)`:/go/bin/boot bin/
13-
docker build -t $(IMAGE) .
14-
rm nginx.tgz
15-
rm bin/boot
9+
cp -pR ../Godeps .
10+
docker build -t $(BUILD_IMAGE) .
11+
docker cp `docker run -d $(BUILD_IMAGE)`:/nginx.tgz image/
12+
docker cp `docker run -d $(BUILD_IMAGE)`:/go/bin/boot image/bin/
13+
docker build -t $(IMAGE) image
14+
rm image/nginx.tgz
15+
rm image/bin/boot
1616

1717
clean: check-docker check-registry
18-
rm -rf parent/Godeps
18+
rm -rf Godeps
1919
docker rmi $(IMAGE)
2020

2121
full-clean: check-docker check-registry
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)