Skip to content
This repository has been archived by the owner on Jun 20, 2018. It is now read-only.

Commit

Permalink
Remove docker config folder creation, as go's os/user does not work.
Browse files Browse the repository at this point in the history
We build go binaries using static linking (CGO=0), which means that
os/user package does not work. Thus, we cannot create a separate config
folder for Docker in config, because getUserConfigFolderPath
in Config.go will not work without knowing the user name
-- which we use os/user for. That means, we have to rely on
the fallback version to be there. #33
  • Loading branch information
peterjasc committed Jul 27, 2016
1 parent 895f239 commit db27b91
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
7 changes: 2 additions & 5 deletions src/github.com/e-gov/fox/fox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ WORKDIR /src/github.com/e-gov/fox/fox/foxservice/

# fox,authn,authz use this config
# temporary database data for foxservice
RUN mkdir /config/docker \
&& cp -n /config/config.json.template /config/docker/config.json \
&& mkdir -p /src/github.com/e-gov/fox/tmp/foxdb/

RUN go get -d && CGO_ENABLED=0 go build -a -installsuffix cgo -v \
RUN mkdir -p /src/github.com/e-gov/fox/tmp/foxdb/ \
&& go get -d && CGO_ENABLED=0 go build -a -installsuffix cgo -v \
-o foxservice.o FoxService.go \
&& cp foxservice.o /bin/foxservice

Expand Down
14 changes: 6 additions & 8 deletions src/github.com/e-gov/fox/login/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@ COPY ./src/github.com/e-gov/fox/util/ util/

ENV GOPATH=/

# authn,authz use this config
# getConfigFolderPath() should find the config in /config/
RUN mkdir /config/docker \
&& cp -n /config/config.json.template /config/docker/config.json \
&& go get -d vendor/github.com/e-gov/fox/authn/keygen/ \
&& go run /src/vendor/github.com/e-gov/fox/authn/keygen/KeyGen.go > /config/key.base64

WORKDIR /src/github.com/e-gov/fox/login/loginservice/

RUN go get -d && CGO_ENABLED=0 go build -a -installsuffix cgo -v \
# authn,authz use this config
# getConfigFolderPath() should find the config in /config/
RUN go get -d vendor/github.com/e-gov/fox/authn/keygen/ \
&& go run /src/vendor/github.com/e-gov/fox/authn/keygen/KeyGen.go \
> /config/key.base64 \
&& go get -d && CGO_ENABLED=0 go build -a -installsuffix cgo -v \
-o loginservice.o LoginService.go \
&& cp loginservice.o /bin/loginservice

Expand Down

0 comments on commit db27b91

Please sign in to comment.