Skip to content

Commit

Permalink
Add a Dockerfile that can build master.
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraaga committed Aug 30, 2019
1 parent 4ab7ee9 commit 34f8972
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**/\.*
!.git

**/target
**/node_modules
**/*.iml

*.md

**/Dockerfile
travis
mvnw*
34 changes: 34 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# Copyright 2016-2019 The OpenZipkin Authors
#
# 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 maven:3-jdk-11-slim

WORKDIR /code
COPY . /code
RUN mvn -B --no-transfer-progress package -DskipTests=true -pl autoconfigure/collector-sqs,autoconfigure/collector-kinesis,autoconfigure/storage-elasticsearch-aws,autoconfigure/storage-xray -am

RUN \
cd /code && mkdir -p /zipkin-aws/sqs && cp autoconfigure/collector-sqs/target/zipkin-autoconfigure-collector-sqs-*-module.jar /zipkin-aws/sqs && cd /zipkin-aws/sqs && jar xf *.jar && rm *.jar && \
cd /code && mkdir -p /zipkin-aws/kinesis && cp autoconfigure/collector-kinesis/target/zipkin-autoconfigure-collector-kinesis-*-module.jar /zipkin-aws/kinesis && cd /zipkin-aws/kinesis && jar xf *.jar && rm *.jar && \
cd /code && mkdir -p /zipkin-aws/elasticsearch-aws && cp autoconfigure/storage-elasticsearch-aws/target/zipkin-autoconfigure-storage-elasticsearch-aws-*-module.jar /zipkin-aws/elasticsearch-aws && cd /zipkin-aws/elasticsearch-aws && jar xf *.jar && rm *.jar && \
cd /code && mkdir -p /zipkin-aws/xray && cp autoconfigure/storage-xray/target/zipkin-autoconfigure-storage-xray-*-module.jar /zipkin-aws/xray && cd /zipkin-aws/xray && jar xf *.jar && rm *.jar

FROM openzipkin/zipkin:master
MAINTAINER Zipkin "https://zipkin.io/"

COPY --from=0 /zipkin-aws/ /zipkin/lib/

RUN echo > .xray_profile

ENV MODULE_OPTS="-Dloader.path=lib/sqs,lib/kinesis,lib/elasticsearch-aws,lib/xray -Dspring.profiles.active=sqs,kinesis,elasticsearch-aws,xray"
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@
</mapping>
<excludes>
<exclude>.travis.yml</exclude>
<exclude>.dockerignore</exclude>
<exclude>.gitignore</exclude>
<exclude>.mvn/**</exclude>
<exclude>mvnw*</exclude>
Expand Down

0 comments on commit 34f8972

Please sign in to comment.