Skip to content

Commit 1d16bf1

Browse files
committed
Merge pull request #8 from ArpNetworking/docker
add docker build
2 parents 33f8998 + e7d8908 commit 1d16bf1

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target/tmp

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2016 Smartsheet.com
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM java:8u77-jre-alpine
16+
MAINTAINER arpnetworking
17+
EXPOSE 7065
18+
EXPOSE 7066
19+
WORKDIR /opt/cluster-aggregator
20+
ENV CONFIG_FILE /opt/cluster-aggregator/config/config.json
21+
ENV PARAMS $CONFIG_FILE
22+
ENV LOGGING_CONFIG -Dlogback.configurationFile=/opt/cluster-aggregator/config/logback.xml
23+
ENV JAVA_OPTS $LOGGING_CONFIG
24+
RUN mkdir -p /opt/cluster-aggregator/logs
25+
RUN mkdir -p /opt/cluster-aggregator/data
26+
ADD config /opt/cluster-aggregator/config
27+
ADD target/appassembler /opt/cluster-aggregator
28+
CMD /opt/cluster-aggregator/bin/cluster-aggregator $PARAMS

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ Usage
2222

2323
### Installation
2424

25+
#### Manual
2526
The artifacts from the build are in *metrics-cluster-aggregator/target/appassembler* and should be copied to an appropriate directory on your application host(s).
2627

28+
#### Docker
29+
If you use Docker, we publish a base docker image that makes it easy for you to layer configuration on top of. Create a Docker image based on the image arpnetworking/cluster-aggregator. Configuration files are typically located at /opt/cluster-aggregator/config/. In addition, you can specify CONFIG_FILE (defaults to /opt/cluster-aggregator/config/config.json), PARAMS (defaults to $CONFIG_FILE), LOGGING_CONFIG (defaults to "-Dlogback.configurationFile=/opt/cluster-aggregator/config/logback.xml"), and JAVA_OPTS (defaults to $LOGGING_CONFIG) environment variables to control startup.
30+
2731
### Execution
2832

2933
In the installation's *bin* directory there are scripts to start Metrics Cluster Aggregator: *cluster-aggregator* (Linux) and *cluster-aggregator.bat* (Windows). One of these should be executed on system start with appropriate parameters; for example:

0 commit comments

Comments
 (0)