Skip to content

Commit

Permalink
Merge pull request #143 from anuraaga/docker-master
Browse files Browse the repository at this point in the history
Add a Dockerfile that can build master.
  • Loading branch information
anuraaga authored Aug 31, 2019
2 parents 4ab7ee9 + 2ff83ea commit 4bec38f
Show file tree
Hide file tree
Showing 4 changed files with 60 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"
13 changes: 13 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## zipkin-aws Docker image

To build a zipkin-aws Docker image, in the top level of the repository, run something
like

```bash
$ docker build -t openzipkin/zipkin-aws:test
```

### Dockerfile migration

We are currently migrating the Docker configuration from https://github.com/openzipkin/docker-zipkin-aws.
If making any changes here, make sure to also reflect them there.
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 4bec38f

Please sign in to comment.