mirror of
https://github.com/traefik/traefik-library-image.git
synced 2026-05-02 18:32:33 +00:00
Traefik v3
This commit is contained in:
@@ -11,6 +11,9 @@ $api_opts = ''
|
||||
if($version.StartsWith('v2')) {
|
||||
$api_opts='--api.insecure'
|
||||
}
|
||||
if($version.StartsWith('v3')) {
|
||||
$api_opts='--api.insecure'
|
||||
}
|
||||
|
||||
docker build -t traefik:$target windows/$target
|
||||
docker run --name lb -d -p 8080:8080 traefik:$target --api $api_opts
|
||||
|
||||
@@ -9,6 +9,9 @@ API_OPTS=""
|
||||
if [[ ${VERSION} = v2* ]]; then
|
||||
API_OPTS="--api.insecure"
|
||||
fi
|
||||
if [[ ${VERSION} = v3* ]]; then
|
||||
API_OPTS="--api.insecure"
|
||||
fi
|
||||
|
||||
TARGETS=(
|
||||
"traefik:${VERSION}-alpine!./alpine"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
FROM alpine:$ALPINE_VERSION
|
||||
RUN apk --no-cache add ca-certificates tzdata
|
||||
RUN set -ex; \
|
||||
apkArch="$(apk --print-arch)"; \
|
||||
case "$apkArch" in \
|
||||
armhf) arch='armv6' ;; \
|
||||
aarch64) arch='arm64' ;; \
|
||||
x86_64) arch='amd64' ;; \
|
||||
s390x) arch='s390x' ;; \
|
||||
*) echo >&2 "error: unsupported architecture: $apkArch"; exit 1 ;; \
|
||||
esac; \
|
||||
wget --quiet -O /tmp/traefik.tar.gz "https://github.com/traefik/traefik/releases/download/${VERSION}/traefik_${VERSION}_linux_$arch.tar.gz"; \
|
||||
tar xzvf /tmp/traefik.tar.gz -C /usr/local/bin traefik; \
|
||||
rm -f /tmp/traefik.tar.gz; \
|
||||
chmod +x /usr/local/bin/traefik
|
||||
COPY entrypoint.sh /
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["traefik"]
|
||||
|
||||
# Metadata
|
||||
LABEL org.opencontainers.image.vendor="Traefik Labs" \
|
||||
org.opencontainers.image.url="https://traefik.io" \
|
||||
org.opencontainers.image.source="https://github.com/traefik/traefik" \
|
||||
org.opencontainers.image.title="Traefik" \
|
||||
org.opencontainers.image.description="A modern reverse-proxy" \
|
||||
org.opencontainers.image.version="$VERSION" \
|
||||
org.opencontainers.image.documentation="https://docs.traefik.io"
|
||||
@@ -0,0 +1,17 @@
|
||||
FROM scratch
|
||||
COPY --from=traefik:${VERSION}-alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=traefik:${VERSION}-alpine /usr/share/zoneinfo /usr/share/
|
||||
COPY --from=traefik:${VERSION}-alpine /usr/local/bin/traefik /
|
||||
|
||||
EXPOSE 80
|
||||
VOLUME ["/tmp"]
|
||||
ENTRYPOINT ["/traefik"]
|
||||
|
||||
# Metadata
|
||||
LABEL org.opencontainers.image.vendor="Traefik Labs" \
|
||||
org.opencontainers.image.url="https://traefik.io" \
|
||||
org.opencontainers.image.source="https://github.com/traefik/traefik" \
|
||||
org.opencontainers.image.title="Traefik" \
|
||||
org.opencontainers.image.description="A modern reverse-proxy" \
|
||||
org.opencontainers.image.version="$VERSION" \
|
||||
org.opencontainers.image.documentation="https://docs.traefik.io"
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -u # Exit on error when uninitialized variable
|
||||
|
||||
if [ $# -eq 0 ] ; then
|
||||
echo "Usage: ./updatev3.sh <traefik tag or branch>"
|
||||
exit
|
||||
fi
|
||||
|
||||
SCRIPT_DIRNAME_ABSOLUTEPATH="$(cd "$(dirname "$0")" && pwd -P)"
|
||||
|
||||
echo "$1" > version
|
||||
|
||||
bash "${SCRIPT_DIRNAME_ABSOLUTEPATH}/update.sh" "$1"
|
||||
@@ -0,0 +1,20 @@
|
||||
FROM mcr.microsoft.com/windows/servercore:1809
|
||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
||||
|
||||
RUN Invoke-WebRequest \
|
||||
-Uri "https://github.com/traefik/traefik/releases/download/${VERSION}/traefik_${VERSION}_windows_amd64.zip" \
|
||||
-OutFile "/traefik.zip"; \
|
||||
Expand-Archive -Path "/traefik.zip" -DestinationPath "/" -Force; \
|
||||
Remove-Item "/traefik.zip" -Force
|
||||
|
||||
EXPOSE 80
|
||||
ENTRYPOINT [ "/traefik" ]
|
||||
|
||||
# Metadata
|
||||
LABEL org.opencontainers.image.vendor="Traefik Labs" \
|
||||
org.opencontainers.image.url="https://traefik.io" \
|
||||
org.opencontainers.image.source="https://github.com/traefik/traefik" \
|
||||
org.opencontainers.image.title="Traefik" \
|
||||
org.opencontainers.image.description="A modern reverse-proxy" \
|
||||
org.opencontainers.image.version="$VERSION" \
|
||||
org.opencontainers.image.documentation="https://docs.traefik.io"
|
||||
@@ -0,0 +1,20 @@
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2022
|
||||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
|
||||
|
||||
RUN Invoke-WebRequest \
|
||||
-Uri "https://github.com/traefik/traefik/releases/download/${VERSION}/traefik_${VERSION}_windows_amd64.zip" \
|
||||
-OutFile "/traefik.zip"; \
|
||||
Expand-Archive -Path "/traefik.zip" -DestinationPath "/" -Force; \
|
||||
Remove-Item "/traefik.zip" -Force
|
||||
|
||||
EXPOSE 80
|
||||
ENTRYPOINT [ "/traefik" ]
|
||||
|
||||
# Metadata
|
||||
LABEL org.opencontainers.image.vendor="Traefik Labs" \
|
||||
org.opencontainers.image.url="https://traefik.io" \
|
||||
org.opencontainers.image.source="https://github.com/traefik/traefik" \
|
||||
org.opencontainers.image.title="Traefik" \
|
||||
org.opencontainers.image.description="A modern reverse-proxy" \
|
||||
org.opencontainers.image.version="$VERSION" \
|
||||
org.opencontainers.image.documentation="https://docs.traefik.io"
|
||||
Reference in New Issue
Block a user