This repository has been archived by the owner on Jun 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it possible to not have to copy everything into container
We do not want to copy the whole project into the Docker container due to 'go get' using GOPATH (which, by default, is the project root) as mentioned in #33. We don't need the vendor folder to pull this off, but it makes more clear which pkgs are considered 'external'.
- Loading branch information
Showing
3 changed files
with
32 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
#=============== FoxService =============== | ||
FROM golang:1.6 | ||
|
||
COPY ./src/github.com/e-gov/fox/ /fox/ | ||
RUN mkdir -p /src/github.com/e-gov/fox/fox/ | ||
|
||
ENV GOPATH=/fox/vendor | ||
COPY ./src/github.com/e-gov/fox/fox/ /src/github.com/e-gov/fox/fox/ | ||
|
||
WORKDIR /fox/foxservice/ | ||
RUN mkdir -p /src/vendor/github.com/e-gov/fox/ | ||
|
||
RUN mkdir /fox/vendor && go get \ | ||
&& CGO_ENABLED=0 go build -a -installsuffix cgo -v \ | ||
-o foxservice.o FoxService.go | ||
WORKDIR /src/vendor/github.com/e-gov/fox/ | ||
|
||
COPY ./src/github.com/e-gov/fox/authn/ authn/ | ||
COPY ./src/github.com/e-gov/fox/authz/ authz/ | ||
COPY ./src/github.com/e-gov/fox/util/ util/ | ||
|
||
COPY foxservice.o /bin/foxservice | ||
ENV GOPATH=/ | ||
|
||
WORKDIR /src/github.com/e-gov/fox/fox/foxservice/ | ||
|
||
RUN go get -d && CGO_ENABLED=0 go build -a -installsuffix cgo -v \ | ||
-o foxservice.o FoxService.go \ | ||
&& cp foxservice.o /bin/foxservice | ||
|
||
CMD ["bin/foxservice"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
#=============== LoginService =============== | ||
FROM golang:1.6 | ||
|
||
COPY ./src/github.com/e-gov/login/ /login/ | ||
RUN mkdir -p /src/github.com/e-gov/fox/login/ | ||
|
||
ENV GOPATH=/login/vendor/ | ||
COPY ./src/github.com/e-gov/fox/login/ /src/github.com/e-gov/fox/login/ | ||
|
||
WORKDIR /login/loginservice/ | ||
RUN mkdir -p /src/vendor/github.com/e-gov/fox/ | ||
|
||
RUN mkdir /login/vendor && go get \ | ||
&& CGO_ENABLED=0 go build -a -installsuffix cgo -v \ | ||
-o loginservice.o LoginService.go | ||
WORKDIR /src/vendor/github.com/e-gov/fox/ | ||
|
||
COPY ./src/github.com/e-gov/fox/authn/ authn/ | ||
COPY ./src/github.com/e-gov/fox/authz/ authz/ | ||
COPY ./src/github.com/e-gov/fox/util/ util/ | ||
|
||
COPY loginservice.o /bin/loginservice | ||
ENV GOPATH=/ | ||
|
||
WORKDIR /src/github.com/e-gov/fox/login/loginservice/ | ||
|
||
RUN go get -d && CGO_ENABLED=0 go build -a -installsuffix cgo -v \ | ||
-o loginservice.o LoginService.go \ | ||
&& cp loginservice.o /bin/loginservice | ||
|
||
CMD ["bin/loginservice"] | ||
|