Skip to content

Commit e1c11a0

Browse files
committed
Added build time args for more flexibility
1 parent 21bc21f commit e1c11a0

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
FROM azul/zulu-openjdk-alpine:11
22

3-
MAINTAINER Naren <[email protected]>
3+
LABEL maintainer="Naren Ravilla"
4+
5+
ARG CMAK_VERSION="3.0.0.5"
6+
ARG ZK_HOSTS="zookeeper:2181"
7+
ARG CMAK_CONFIGFILE="conf/application.conf"
48

59
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk/ \
6-
ZK_HOSTS=zookeeper:2181 \
7-
CMAK_VERSION=3.0.0.5\
8-
CMAK_CONFIGFILE="conf/application.conf"
10+
ZK_HOSTS=$ZK_HOSTS \
11+
CMAK_VERSION=$CMAK_VERSION \
12+
CMAK_CONFIGFILE=$CMAK_CONFIGFILE
913

1014
WORKDIR /opt
1115

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
CMAK is a tool for managing Kafka cluster(s). This repository creates a docker image for running CMAK as a container. The actual CMAK repository is located [here](https://github.com/yahoo/CMAK).
44

5+
## How to build the image:
6+
7+
```sh
8+
$ docker build --build-arg CMAK_VERSION="3.0.0.5" -t <image-tag> .
9+
```
10+
11+
You can also pass in `ZK_HOSTS` & `CMAK_CONFIGFILE` as build time arguments.
12+
13+
514
> I have also added docker-compose and kubernetes deployment files for helping to set up a simple local kafka setup along with CMAK.
615
716
* For docker-compose
@@ -23,4 +32,4 @@ $ kubectl apply -f cmak.yaml
2332

2433
hit `localhost:30090` in browser of your choice for accessing CMAK.
2534

26-
**Note: We are using different port in case of kubernetes setup because of Kubernetes Service(NodePort) setup in k8s cluster.**
35+
**Note: We are using different port in case of kubernetes setup because of Kubernetes Service(NodePort) setup in k8s cluster.**

docker-compose/docker-compose.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ services:
1919
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
2020
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
2121
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
22+
KAFKA_JMX_PORT: 9999
2223
kafka-manager:
23-
image: nanic/cmak:latest
24+
build:
25+
dockerfile: Dockerfile
26+
context: ../.
27+
args:
28+
CMAK_VERSION: "3.0.0.5"
2429
ports:
2530
- "9000:9000"
2631
depends_on:

0 commit comments

Comments
 (0)