mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
Merge pull request #328 from yuce/make-docker-update
Make docker update
This commit is contained in:
commit
61d2997aee
3 changed files with 28 additions and 2 deletions
14
Dockerfile
14
Dockerfile
|
|
@ -7,8 +7,20 @@ VOLUME /data
|
|||
|
||||
RUN echo 'data-dir = "/data"' > /config
|
||||
|
||||
RUN git clone --depth 1 https://github.com/Masterminds/glide.git /go/src/github.com/Masterminds/glide \
|
||||
&& cd /go/src/github.com/Masterminds/glide \
|
||||
&& git fetch --tags --depth 1 \
|
||||
&& git checkout tags/v0.12.3 -b build \
|
||||
&& make build \
|
||||
&& mv ./glide /go/bin \
|
||||
&& cd / \
|
||||
&& rm -r /go/src/github.com/Masterminds/glide
|
||||
|
||||
COPY . /go/src/github.com/pilosa/pilosa
|
||||
RUN CGO_ENABLED=0 go install -a github.com/pilosa/pilosa/cmd/pilosa
|
||||
|
||||
RUN cd /go/src/github.com/pilosa/pilosa \
|
||||
&& make vendor \
|
||||
&& CGO_ENABLED=0 go install -a github.com/pilosa/pilosa/cmd/pilosa
|
||||
|
||||
ENTRYPOINT ["/go/bin/pilosa"]
|
||||
CMD ["-config", "/config"]
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -43,5 +43,5 @@ install: vendor
|
|||
go install $(LDFLAGS) $(FLAGS) $(CLONE_URL)/cmd/pilosa
|
||||
go install $(LDFLAGS) $(FLAGS) $(CLONE_URL)/cmd/pilosactl
|
||||
|
||||
docker: vendor
|
||||
docker:
|
||||
docker build -t pilosa:latest .
|
||||
|
|
|
|||
14
README.md
14
README.md
|
|
@ -66,6 +66,20 @@ The remaining configuration options should be the same on every node in the clus
|
|||
|
||||
`[[cluster.node]]`: specifies each node within the cluster
|
||||
|
||||
## Docker
|
||||
|
||||
You can create a Pilosa container using `make docker` or equivalently:
|
||||
```
|
||||
docker build -t pilosa:latest .
|
||||
```
|
||||
|
||||
You can run a temporary container using:
|
||||
```
|
||||
docker run -it --rm --name pilosa -p 15000:15000 pilosa:latest
|
||||
```
|
||||
|
||||
When you click `Ctrl+C` to stop the container, the container and the data in the container will be erased. You can leave out `--rm` flag to keep the data in the container. See [Docker documentation](https://docs.docker.com) for other options.
|
||||
|
||||
## Usage
|
||||
|
||||
You can interact with Pilosa via HTTP requests to the host:port on which you have Pilosa running.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue