Skip to content

Commit

Permalink
update docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
pingtest committed Jun 5, 2020
1 parent 40455f3 commit 46f1152
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
22 changes: 9 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
FROM golang:alpine AS build
FROM golang:1.14 AS build

RUN apk add --no-cache -U make git
COPY . /src/project
WORKDIR /src/project

RUN export CGO_ENABLED=0 &&\
export GOPROXY=https://goproxy.io &&\
make &&\
cp cmd/registry/registry /
RUN cp etc/registry.sample.conf /registry.conf

FROM golang:alpine

RUN apk add -U git
cp cmd/registry/registry /registry &&\
cp etc/registry.sample.conf /registry.conf

FROM debian:10
RUN apt-get update && apt-get install -y ca-certificates
COPY --from=build /registry /registry
COPY --from=build /registry.conf /etc/registry.conf

VOLUME /var/log/registry
VOLUME /var/opt/registry

EXPOSE 8000

ENTRYPOINT ["/registry -config /etc/registry.conf"]
CMD []
CMD ["/registry", "-config", "/etc/registry.conf"]
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ registry -config /etc/node0.conf

registry -config /tmp/node1.conf -join 127.0.0.1:9000

```
```

## Use docker image

docker run -d -p8000:8000 lodastack/registry
10 changes: 5 additions & 5 deletions etc/registry.sample.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
base = "ou=People,dc=gitlab,dc=example"

[wework]
enable = false
corpid = ""
corpsecret = ""
redirect = ""
enable = false
corpid = ""
corpsecret = ""
redirect = ""

[dns]
enable = false
Expand All @@ -54,4 +54,4 @@
group = "lodastack-plugins"

[event]
clearURL = "http://127.0.0.1:8001/event/status"
clearURL = "http://event.default.svc.cluster.local:8001/event/status"

0 comments on commit 46f1152

Please sign in to comment.