Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-11-01 19:17:39 -04:00
parent 8b4b42e3a3
commit 60208b7524
No known key found for this signature in database
GPG Key ID: 18F3685C0022BFF3
2 changed files with 0 additions and 33 deletions

View File

@ -1,11 +0,0 @@
FROM docker:latest
RUN apk add --no-cache \
bash \
ca-certificates \
curl \
tar
COPY build.sh /usr/local/bin/build
ENTRYPOINT ["build"]

View File

@ -1,22 +0,0 @@
#!/bin/bash
set -e
set -o pipefail
set -x
tarball=$1
image=$2
volume=/build
mkdir -p "$volume"
(curl --fail --silent --show-error --location "$tarball" | tar xvz --strip=1 -C "$volume" 2>/dev/null) || (echo ""; echo "ERROR: Could not prepare an image.";echo "Please verify that $tarball is still available and is publicly accessible."; exit 1;)
# Try to pull the image.
docker pull "$image" || true
cd "$volume"
docker build --cache-from "$image" -t "$image" .
docker push "$image"