diff --git a/Dockerfile b/Dockerfile index 22d7458..251b430 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,5 @@ LABEL org.label-schema.vendor="Containous" \ org.label-schema.url="https://traefik.io" \ org.label-schema.name="Traefik" \ org.label-schema.description="A modern reverse-proxy" \ - org.label-schema.version="v1.3.0" \ + org.label-schema.version="v1.3.1" \ org.label-schema.docker.schema-version="1.0" \ No newline at end of file diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 5e25918..e87d209 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -13,5 +13,5 @@ LABEL org.label-schema.vendor="Containous" \ org.label-schema.url="https://traefik.io" \ org.label-schema.name="Traefik" \ org.label-schema.description="A modern reverse-proxy" \ - org.label-schema.version="v1.3.0" \ + org.label-schema.version="v1.3.1" \ org.label-schema.docker.schema-version="1.0" \ No newline at end of file diff --git a/alpine/arm/Dockerfile.aarch32 b/alpine/arm/Dockerfile.aarch32 new file mode 100644 index 0000000..7f7a2ab --- /dev/null +++ b/alpine/arm/Dockerfile.aarch32 @@ -0,0 +1,21 @@ +FROM arm32v6/alpine:3.5 + +RUN apk --update upgrade \ + && apk --no-cache --no-progress add ca-certificates \ + && apk add openssl \ + && rm -rf /var/cache/apk/* +RUN wget https://github.com/containous/traefik/releases/download/v1.3.1/traefik_linux-arm \ + && mv traefik_linux-arm /usr/local/bin/traefik \ + && chmod +x /usr/local/bin/traefik +COPY entrypoint.sh / +EXPOSE 80 +ENTRYPOINT ["/entrypoint.sh"] +CMD ["--help"] + +# Metadata +LABEL org.label-schema.vendor="Containous" \ + org.label-schema.url="https://traefik.io" \ + org.label-schema.name="Traefik" \ + org.label-schema.description="A modern reverse-proxy" \ + org.label-schema.version="v1.3.1" \ + org.label-schema.docker.schema-version="1.0" diff --git a/alpine/arm/Dockerfile.aarch64 b/alpine/arm/Dockerfile.aarch64 new file mode 100644 index 0000000..adfe3b2 --- /dev/null +++ b/alpine/arm/Dockerfile.aarch64 @@ -0,0 +1,21 @@ +FROM arm64v8/alpine:3.5 + +RUN apk --update upgrade \ + && apk --no-cache --no-progress add ca-certificates \ + && apk add openssl \ + && rm -rf /var/cache/apk/* +RUN wget https://github.com/containous/traefik/releases/download/v1.3.1/traefik_linux-arm64 \ + && mv traefik_linux-arm64 /usr/local/bin/traefik \ + && chmod +x /usr/local/bin/traefik +COPY entrypoint.sh / +EXPOSE 80 +ENTRYPOINT ["/entrypoint.sh"] +CMD ["--help"] + +# Metadata +LABEL org.label-schema.vendor="Containous" \ + org.label-schema.url="https://traefik.io" \ + org.label-schema.name="Traefik" \ + org.label-schema.description="A modern reverse-proxy" \ + org.label-schema.version="v1.3.1" \ + org.label-schema.docker.schema-version="1.0" diff --git a/alpine/arm/Dockerfile.tmpl b/alpine/arm/Dockerfile.tmpl new file mode 100644 index 0000000..08a5b3c --- /dev/null +++ b/alpine/arm/Dockerfile.tmpl @@ -0,0 +1,21 @@ +FROM $CONTAINER_IMAGE + +RUN apk --update upgrade \ + && apk --no-cache --no-progress add ca-certificates \ + && apk add openssl \ + && rm -rf /var/cache/apk/* +RUN wget https://github.com/containous/traefik/releases/download/$VERSION/$TRAEFIK_BINARY \ + && mv $TRAEFIK_BINARY /usr/local/bin/traefik \ + && chmod +x /usr/local/bin/traefik +COPY entrypoint.sh / +EXPOSE 80 +ENTRYPOINT ["/entrypoint.sh"] +CMD ["--help"] + +# Metadata +LABEL org.label-schema.vendor="Containous" \ + org.label-schema.url="https://traefik.io" \ + org.label-schema.name="Traefik" \ + org.label-schema.description="A modern reverse-proxy" \ + org.label-schema.version="$VERSION" \ + org.label-schema.docker.schema-version="1.0" diff --git a/alpine/arm/entrypoint.sh b/alpine/arm/entrypoint.sh new file mode 100755 index 0000000..49b3a32 --- /dev/null +++ b/alpine/arm/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +# first arg is `-f` or `--some-option` +if [ "${1#-}" != "$1" ]; then + set -- traefik "$@" +fi + +# if our command is a valid Traefik subcommand, let's invoke it through Traefik instead +# (this allows for "docker run traefik version", etc) +if traefik "$1" --help 2>&1 >/dev/null | grep "help requested" > /dev/null 2>&1; then + set -- traefik "$@" +fi + +exec "$@" \ No newline at end of file diff --git a/alpine/arm/update.sh b/alpine/arm/update.sh new file mode 100755 index 0000000..bd9e411 --- /dev/null +++ b/alpine/arm/update.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +if [ $# -eq 0 ] ; then + echo "Usage: ./update.sh " + exit +fi + +export VERSION=$1 + +# cd to the current directory so the script can be run from anywhere. +cd `dirname $0` + +echo "Updating Dockerfile.aarch64 and Dockerfile.aarch32..." +export TRAEFIK_BINARY="traefik_linux-arm64" +export CONTAINER_IMAGE="arm64v8/alpine:3.5" +envsubst < ./Dockerfile.tmpl > ./Dockerfile.aarch64 +TRAEFIK_BINARY="traefik_linux-arm" +CONTAINER_IMAGE="arm32v6/alpine:3.5" +envsubst < ./Dockerfile.tmpl > ./Dockerfile.aarch32 diff --git a/alpine/traefik b/alpine/traefik index e07e946..9fdd1ef 100755 Binary files a/alpine/traefik and b/alpine/traefik differ diff --git a/traefik b/traefik index e07e946..9fdd1ef 100755 Binary files a/traefik and b/traefik differ diff --git a/update.sh b/update.sh index ac5701c..c071745 100755 --- a/update.sh +++ b/update.sh @@ -25,4 +25,7 @@ echo "Replace $VERSION in Dockerfiles..." envsubst < Dockerfile.tmpl > Dockerfile envsubst < alpine/Dockerfile.tmpl > alpine/Dockerfile +echo "Updating multi-arch Dockerfiles..." +./alpine/arm/update.sh $VERSION + echo "Done."