Steps I took:
- pull master branch
- reset to ca68a34d39afce6ffaf47befefccc0bc3e044c06 which is v0.8.3
- build all binary with
go install github.com/dgraph-io/dgraph/cmd/...
- then use dgraph/dgraph:master as base image and replace all binaries ( dgraph dgraph-bulk-loader dgraph-converter dgraph-live-loader dgraphzero postingiterator)
- test run locally. mkdir -p ~/dgraph
docker run -it -p 8080:8080 -p 9080:9080 -v ~/dgraph:/dgraph --name dgraph new-dgraph:latest dgraphzero -w zw
docker exec -it dgraph dgraph --bindall=true --memory_mb 2048 -peer 127.0.0.1:8888
It does not seem to work because I cannot access Dgraph UI via localhost:8080
logs from dgraph zero:
Setting up listener at: localhost:8888
Setting up listener at: localhost:8889
2017/10/23 00:59:46 node.go:246: Group 0 found 0 entries
2017/10/23 00:59:46 raft.go:567: INFO: 1 became follower at term 0
2017/10/23 00:59:46 raft.go:316: INFO: newRaft 1 [peers: , term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
2017/10/23 00:59:46 raft.go:567: INFO: 1 became follower at term 1
Running Dgraph zero…
2017/10/23 00:59:49 raft.go:749: INFO: 1 is starting a new election at term 1
2017/10/23 00:59:49 raft.go:580: INFO: 1 became candidate at term 2
2017/10/23 00:59:49 raft.go:664: INFO: 1 received MsgVoteResp from 1 at term 2
2017/10/23 00:59:49 raft.go:621: INFO: 1 became leader at term 2
2017/10/23 00:59:49 node.go:301: INFO: raft.node: 1 elected leader 1 at term 2
2017/10/23 01:00:06 zero.go:239: Got connection request: id:1 addr:“localhost:12345”
2017/10/23 01:00:06 pool.go:104: == CONNECT ==> Setting localhost:12345
2017/10/23 01:00:06 raft.go:253: Applied proposal: {Id:3127895948 Member:id:1 group_id:1 addr:“localhost:12345” Tablet: MaxLeaseId:0}
2017/10/23 01:00:06 raft.go:253: Applied proposal: {Id:683498661 Member:id:1 group_id:1 addr:“localhost:12345” leader:true last_update:1508720406 Tablet: MaxLeaseId:0}
logs from dgraph
2017/10/23 02:29:05 pool.go:104: == CONNECT ==> Setting 127.0.0.1:8888
2017/10/23 02:29:05 gRPC server started. Listening on port 9080
2017/10/23 02:29:05 HTTP server started. Listening on port 8080
2017/10/23 02:29:05 worker.go:105: Worker listening at address: [::]:12345
2017/10/23 02:29:05 groups.go:114: Connected to group zero. State: counter:5 groups:<key:1 value:<members:<key:1 value:<id:1 group_id:1 addr:“localhost:12345” > > > > zeros:<key:1 value:<id:1 addr:“localhost:8888” leader:true > >
2017/10/23 02:29:05 draft.go:143: Node ID: 1 with GroupID: 1
2017/10/23 02:29:05 pool.go:104: == CONNECT ==> Setting localhost:8888
2017/10/23 02:29:05 node.go:246: Group 1 found 0 entries
2017/10/23 02:29:05 draft.go:702: New Node for group: 1
2017/10/23 02:29:05 raft.go:567: INFO: 1 became follower at term 0
2017/10/23 02:29:05 raft.go:316: INFO: newRaft 1 [peers: , term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
2017/10/23 02:29:05 raft.go:567: INFO: 1 became follower at term 1
2017/10/23 02:29:05 raft.go:749: INFO: 1 is starting a new election at term 1
2017/10/23 02:29:05 raft.go:580: INFO: 1 became candidate at term 2
2017/10/23 02:29:05 raft.go:664: INFO: 1 received MsgVoteResp from 1 at term 2
2017/10/23 02:29:05 raft.go:621: INFO: 1 became leader at term 2
2017/10/23 02:29:05 node.go:301: INFO: raft.node: 1 elected leader 1 at term 2
update: Build with following Dockerfile failes to access UI as well
#FROM dgraph/dgraph:master
FROM ubuntu:14.04
MAINTAINER Dgraph Labs contact@dgraph.io
RUN apt-get update
RUN apt-get -y --force-yes install wget curl tar
RUN apt-get install -y --force-yes software-properties-common python-software-properties && sudo add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update
RUN apt-get install -y --force-yes g+±4.9
COPY bin/dgraph /usr/local/bin/dgraph
COPY bin/dgraphzero /usr/local/bin/dgraphzero
COPY bin/dgraph-bulk-loader /usr/local/bin/dgraph-bulk-loader
COPY bin/dgraph-converter /usr/local/bin/dgraph-converter
COPY bin/dgraph-live-loader /usr/local/bin/dgraph-live-loader
COPY bin/postingiterator /usr/local/bin/postingiterator
RUN mkdir /dgraph
EXPOSE 8080
EXPOSE 9080
WORKDIR /dgraph
CMD [“dgraph”]