mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 15:10:12 +01:00
Moved dockerfile
This commit is contained in:
parent
8197bb669d
commit
0e93a8c612
4 changed files with 0 additions and 93 deletions
|
|
@ -1,20 +0,0 @@
|
||||||
#
|
|
||||||
# Alpine image to get some needed data
|
|
||||||
#
|
|
||||||
FROM alpine:latest as alpine
|
|
||||||
RUN apk add --no-cache \
|
|
||||||
ca-certificates \
|
|
||||||
tzdata
|
|
||||||
|
|
||||||
#
|
|
||||||
# Image
|
|
||||||
#
|
|
||||||
FROM scratch
|
|
||||||
LABEL "com.centurylinklabs.watchtower"="true"
|
|
||||||
|
|
||||||
# copy files from other containers
|
|
||||||
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
||||||
COPY --from=alpine /usr/share/zoneinfo /usr/share/zoneinfo
|
|
||||||
|
|
||||||
COPY watchtower /
|
|
||||||
ENTRYPOINT ["/watchtower"]
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
#
|
|
||||||
# Alpine image to get some needed data
|
|
||||||
#
|
|
||||||
FROM alpine:latest as alpine
|
|
||||||
RUN apk add --no-cache \
|
|
||||||
ca-certificates \
|
|
||||||
tzdata
|
|
||||||
|
|
||||||
#
|
|
||||||
# Image
|
|
||||||
#
|
|
||||||
FROM scratch
|
|
||||||
LABEL "com.centurylinklabs.watchtower"="true"
|
|
||||||
|
|
||||||
# copy files from other containers
|
|
||||||
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
||||||
COPY --from=alpine /usr/share/zoneinfo /usr/share/zoneinfo
|
|
||||||
|
|
||||||
COPY watchtower /
|
|
||||||
ENTRYPOINT ["/watchtower"]
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
PROGNAME=$(basename $0)
|
|
||||||
VERSION_BUILD=$1
|
|
||||||
|
|
||||||
function error_exit
|
|
||||||
{
|
|
||||||
echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
|
||||||
error_exit "Please provide version as first argument."
|
|
||||||
fi
|
|
||||||
|
|
||||||
SEMVER=${VERSION_BUILD#*v}
|
|
||||||
VERSION=`echo $SEMVER | awk '{split($0,a,"."); print a[1]}'`
|
|
||||||
BUILD=`echo $SEMVER | awk '{split($0,a,"."); print a[2]}'`
|
|
||||||
PATCH=`echo $SEMVER | awk '{split($0,a,"."); print a[3]}'`
|
|
||||||
|
|
||||||
if [ "${VERSION}" = "" ]; then
|
|
||||||
echo "Please provide a semantic version."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${BUILD}" = "" ]; then
|
|
||||||
BUILD='0'
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${PATCH}" = "" ]; then
|
|
||||||
PATCH='0'
|
|
||||||
fi
|
|
||||||
|
|
||||||
push_docker() {
|
|
||||||
echo " -> push $1 $2"
|
|
||||||
docker tag $1 $2 || exit 1
|
|
||||||
docker push $2 || exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
push_all() {
|
|
||||||
IMAGE_NAME_VERSION=${1}${VERSION}.${BUILD}.${PATCH}
|
|
||||||
echo "Pulling $IMAGE_NAME_VERSION..."
|
|
||||||
docker pull ${IMAGE_NAME_VERSION} || exit 1
|
|
||||||
echo "Pushing $IMAGE_NAME_VERSION..."
|
|
||||||
push_docker ${IMAGE_NAME_VERSION} ${1}${VERSION}.${BUILD}
|
|
||||||
push_docker ${IMAGE_NAME_VERSION} ${1}${VERSION}
|
|
||||||
push_docker ${IMAGE_NAME_VERSION} ${1}latest
|
|
||||||
}
|
|
||||||
|
|
||||||
IMAGE_NAME=v2tec/watchtower
|
|
||||||
push_all ${IMAGE_NAME}:
|
|
||||||
push_all ${IMAGE_NAME}:armhf-
|
|
||||||
push_all ${IMAGE_NAME}:arm64v8-
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue