Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker image support #52

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM golang:1.9-alpine

RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh make

RUN go get -u github.com/kardianos/govendor
ADD . /go/src/github.com/travisjeffery/jocko
WORKDIR /go/src/github.com/travisjeffery/jocko
RUN govendor sync
RUN govendor test -v -p=1 +local
RUN go build -o jocko cmd/jocko/main.go
RUN go build -o createtopic cmd/createtopic/main.go

FROM alpine:latest

COPY --from=0 /go/src/github.com/travisjeffery/jocko/jocko /usr/local/bin/jocko
COPY --from=0 /go/src/github.com/travisjeffery/jocko/createtopic /usr/local/bin/createtopic

EXPOSE 9092 9093 9094

VOLUME "/tmp/jocko"

CMD ["jocko"]
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3'

services:

jocko_main:
build:
context: .
image: jocko

jocko_cluster:
build:
context: .
image: jocko
command: jocko --serfmembers=jocko_main:9094
4 changes: 4 additions & 0 deletions examples/cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ $ ./jocko --debug \
--serfmembers=127.0.0.1:9003 \
--id=3
```

## docker-compose cluster

To start a [docker compose](https://docs.docker.com/compose/) cluster node use the provided `/docker-compose.yml`.