Skip to content

Commit

Permalink
Customised docker file for docker swarm (pravega#123)
Browse files Browse the repository at this point in the history
* Customised docker file for docker swarm

Signed-off-by: anisha.kj <[email protected]>

* changed zookeeper vesrion

Signed-off-by: anisha.kj <[email protected]>

* Modified Makefile to build the swarm image

Signed-off-by: anisha.kj <[email protected]>
  • Loading branch information
anishakj authored and amuraru committed Mar 4, 2020
1 parent c27369a commit 2925a9c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,21 @@ build-zk-image:
docker build --build-arg VERSION=$(VERSION) --build-arg GIT_SHA=$(GIT_SHA) -t $(APP_REPO):$(VERSION) ./docker
docker tag $(APP_REPO):$(VERSION) $(APP_REPO):latest

build-zk-image-swarm:
docker build --build-arg VERSION=$(VERSION)-swarm --build-arg GIT_SHA=$(GIT_SHA) -f ./docker/Dockerfile-swarm -t $(APP_REPO):$(VERSION)-swarm ./docker

test:
go test $$(go list ./... | grep -v /vendor/) -race -coverprofile=coverage.txt -covermode=atomic

login:
@docker login -u "$(DOCKER_USER)" -p "$(DOCKER_PASS)"

push: build-image build-zk-image login
push: build-image build-zk-image build-zk-image-swarm login
docker push $(REPO):$(VERSION)
docker push $(REPO):latest
docker push $(APP_REPO):$(VERSION)
docker push $(APP_REPO):latest
docker push $(APP_REPO):$(VERSION)-swarm
docker tag $(REPO):$(VERSION) $(ALTREPO):$(VERSION)
docker tag $(REPO):$(VERSION) $(ALTREPO):latest
docker tag $(APP_REPO):$(VERSION) $(APP_ALTREPO):$(VERSION)
Expand Down
12 changes: 12 additions & 0 deletions docker/Dockerfile-swarm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Copyright (c) Dell Inc., or its subsidiaries. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#

FROM zookeeper:3.5.5
COPY zoo.cfg.swarm /conf/zoo.cfg
12 changes: 12 additions & 0 deletions docker/zoo.cfg.swarm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dataDir=/data
dataLogDir=/datalog
tickTime=2000
initLimit=5
syncLimit=2
autopurge.snapRetainCount=3
autopurge.purgeInterval=0
maxClientCnxns=60
standaloneEnabled=true
admin.enableServer=true
server.1=localhost:2888:3888;2181
4lw.commands.whitelist=cons, envi, conf, crst, srvr, stat, mntr, ruok

0 comments on commit 2925a9c

Please sign in to comment.