-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a Docker build folder with makefile (#23)
add a Docker build folder with makefile
- Loading branch information
Showing
5 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
.gradle/ | ||
.DS_Store | ||
build/ | ||
logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# 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 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
FROM anapsix/alpine-java | ||
|
||
MAINTAINER [email protected] | ||
|
||
WORKDIR /opt/kafka-monitor | ||
ADD build/ build/ | ||
ADD core/build/ core/build/ | ||
ADD services/build/ services/build/ | ||
ADD tests/build/ tests/build/ | ||
ADD bin/kafka-monitor-start.sh bin/kafka-monitor-start.sh | ||
ADD bin/kmf-run-class.sh bin/kmf-run-class.sh | ||
ADD config/kafka-monitor.properties config/kafka-monitor.properties | ||
ADD config/log4j.properties config/log4j.properties | ||
ADD docker/kafka-monitor-docker-entry.sh kafka-monitor-docker-entry.sh | ||
ADD webapp/ webapp/ | ||
|
||
CMD ["/opt/kafka-monitor/kafka-monitor-docker-entry.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2016 The Kubernetes Authors 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 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
all: push | ||
|
||
TAG ?= 0.1 | ||
PREFIX ?= quay.io/samsung_cnct/kafka-monitor | ||
|
||
container: | ||
cd ../ && \ | ||
docker build -t $(PREFIX):$(TAG) -f docker/Dockerfile . | ||
|
||
push: container | ||
docker push $(PREFIX):$(TAG) | ||
|
||
clean: | ||
docker rmi $(PREFIX):$(TAG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Kafka Monitor Docker build | ||
This build process assumes that you have already built the application | ||
using gradlew as specified in the parent README. If you haven't, this | ||
build will error out complaining of missing files. | ||
|
||
## Getting Started | ||
|
||
### Build the container locally | ||
Decide where you would like the built container to be stored. The | ||
default is quay.io/coffeepac/kafak-monitor. You can probably not | ||
write to this location so you should specifiy a new location either | ||
at the command line or in an environment variable | ||
|
||
Using default tag/repo location | ||
``` | ||
make container | ||
``` | ||
|
||
Using command line flags | ||
``` | ||
make container -e TAG=0.2 | ||
``` | ||
|
||
Using environment variables | ||
``` | ||
export PREFIX=quay.io/your_userid/kafka-monitor | ||
make container | ||
``` | ||
|
||
### Push container to remote repository | ||
``` | ||
make push | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# 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 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
set -x | ||
|
||
# wait for DNS services to be available | ||
sleep 10 | ||
|
||
bin/kafka-monitor-start.sh config/kafka-monitor.properties |