Skip to content

Commit

Permalink
Adds description labels and fixes Docker Hub build (#47)
Browse files Browse the repository at this point in the history
This adds better metadata to the image instead of comments.

This also fixes the incorrectly named hook used by automated DockerHub builds.
  • Loading branch information
adriancole authored Oct 8, 2020
1 parent 22f9056 commit 52f1b3b
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 12 deletions.
10 changes: 6 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ RUN cd /code/$target && mvn -q --batch-mode -DskipTests package && \
cp -p /code/docker/bin/docker-healthcheck . && \
cp -p /code/docker/bin/start-${platform}-example start-brave-example

## Spring WebMVC 2.5/Servlet 2.5/Jetty 7/Java 6 example
FROM azul/zulu-openjdk-alpine:6u119-6.22.0.3 as webmvc25-jetty
LABEL description="Tracing Example: Spring WebMVC 2.5/Servlet 2.5/Jetty 7/Java 6"
# Adding maintainer label as we are using a 3rd party base layer
LABEL maintainer="OpenZipkin https://zipkin.io/"

WORKDIR /brave-example
COPY --from=install /install/webmvc25-jetty/ .
Expand All @@ -51,8 +53,8 @@ ENTRYPOINT ["start-brave-example"]
# We use start period of 30s to avoid marking the container unhealthy on slow or contended CI hosts
HEALTHCHECK --interval=1s --start-period=30s --timeout=5s CMD ["docker-healthcheck"]

## Spring WebMVC 3/Servlet 3.0/Jetty 8/Java 7 example
FROM openzipkin/java:1.7.0_261-b02-jre as webmvc3-jetty
LABEL description="Tracing Example: Spring WebMVC 3/Servlet 3.0/Jetty 8/Java 7"

WORKDIR /brave-example
COPY --from=install /install/webmvc3-jetty/ .
Expand All @@ -68,8 +70,8 @@ ENTRYPOINT ["start-brave-example"]
# We use start period of 30s to avoid marking the container unhealthy on slow or contended CI hosts
HEALTHCHECK --interval=1s --start-period=30s --timeout=5s CMD ["docker-healthcheck"]

## Spring WebMVC 4/Servlet 3.1/Jetty 9/Java 8 example
FROM openzipkin/java:1.8.0_252-b09-jre as webmvc4-jetty
LABEL description="Tracing Example: Spring WebMVC 4/Servlet 3.1/Jetty 9/Java 8"

WORKDIR /brave-example
COPY --from=install /install/webmvc4-jetty/ .
Expand All @@ -85,8 +87,8 @@ ENTRYPOINT ["start-brave-example"]
# We use start period of 30s to avoid marking the container unhealthy on slow or contended CI hosts
HEALTHCHECK --interval=1s --start-period=30s --timeout=5s CMD ["docker-healthcheck"]

## Spring WebMVC 4/Spring Boot 1.5/Java 8 example
FROM openzipkin/java:1.8.0_252-b09-jre as webmvc4-boot
LABEL description="Tracing Example: Spring WebMVC 4/Spring Boot 1.5/Java 8"

WORKDIR /brave-example
COPY --from=install /install/webmvc4-boot/ .
Expand Down
1 change: 1 addition & 0 deletions docker/hooks/post_push → docker/hooks/push
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh -v

# Override push to avoid pushing a latest tag. We use tags for each example.
if [ "$DOCKER_REPO" = "index.docker.io/openzipkin/example-brave" ]; then
ALL_EXAMPLES=$(cd ../; ls */pom.xml|sed 's~/pom.xml~~g')

Expand Down
2 changes: 1 addition & 1 deletion webmvc25-jetty/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Brave Example: Spring WebMVC 2.5/Servlet 2.5/Jetty 7
## Tracing Example: Spring WebMVC 2.5/Servlet 2.5/Jetty 7

### spring-webmvc-servlet.xml

Expand Down
2 changes: 1 addition & 1 deletion webmvc25-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<packaging>war</packaging>

<name>brave-example-webmvc25-jetty</name>
<description>Brave Example: Spring WebMVC 2.5/Servlet 2.5/Jetty 7</description>
<description>Tracing Example: Spring WebMVC 2.5/Servlet 2.5/Jetty 7</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion webmvc3-jetty/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Brave Example: Spring WebMVC 3/Servlet 3.0/Jetty 8
## Tracing Example: Spring WebMVC 3/Servlet 3.0/Jetty 8

### spring-webmvc-servlet.xml

Expand Down
2 changes: 1 addition & 1 deletion webmvc3-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<packaging>war</packaging>

<name>brave-example-webmvc3-jetty</name>
<description>Brave Example: Spring WebMVC 3/Servlet 3.0/Jetty 8</description>
<description>Tracing Example: Spring WebMVC 3/Servlet 3.0/Jetty 8</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion webmvc4-boot/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Brave Example: Spring WebMVC 4/Spring Boot 1.5
## Tracing Example: Spring WebMVC 4/Spring Boot 1.5

Instead of servlet, this uses Spring Boot 1.5 to create a self-contained
application that runs Spring WebMVC 4 controllers.
Expand Down
2 changes: 1 addition & 1 deletion webmvc4-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<packaging>jar</packaging>

<name>brave-example-webmvc4-boot</name>
<description>Brave Example: Spring WebMVC 4/Spring Boot 1.5</description>
<description>Tracing Example: Spring WebMVC 4/Spring Boot 1.5</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion webmvc4-jetty/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Brave Example: Spring WebMVC 4/Servlet 3.1/Jetty 9
## Tracing Example: Spring WebMVC 4/Servlet 3.1/Jetty 9

### ExampleInitializer

Expand Down
2 changes: 1 addition & 1 deletion webmvc4-jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<packaging>war</packaging>

<name>brave-example-webmvc4-jetty</name>
<description>Brave Example: Spring WebMVC 4/Servlet 3.1/Jetty 9</description>
<description>Tracing Example: Spring WebMVC 4/Servlet 3.1/Jetty 9</description>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down

0 comments on commit 52f1b3b

Please sign in to comment.