From 6fbdc2e5fa1ae9476310ea8f0156a49ec2919933 Mon Sep 17 00:00:00 2001 From: Alex Povel Date: Thu, 14 Oct 2021 17:55:23 +0200 Subject: [PATCH] Remove retired files MWE file is pretty useless, and build hooks aren't needed anymore without Docker Automated Builds --- docker/hooks/build | 75 -------------------------- docker/tex/minimal-working-example.tex | 5 -- 2 files changed, 80 deletions(-) delete mode 100644 docker/hooks/build delete mode 100644 docker/tex/minimal-working-example.tex diff --git a/docker/hooks/build b/docker/hooks/build deleted file mode 100644 index 7283b54..0000000 --- a/docker/hooks/build +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash - -# Usage: `./this-script ` -# -# The image name should be of the form 'namespace:tag', e.g. -# 'yourname/yourproject:latest', see also https://docs.docker.com/docker-hub/builds/advanced/. -# -# If $IMAGE_NAME is defined as an environment variable, it takes precedent and the -# command line argument image name will be ignored. -# If neither is given, this script fails. - -# In 2021, Docker retired its free automated builds. They now require a Pro plan. -# (We can thank abusive miners for that). -# To cope, and to not have to pay, these images are now built locally and pushed -# manually. Hence, this script now works for both local use as well as DockerHub use -# (should a Pro plan be available). - -set -u - -# For more info, see: -# https://docs.docker.com/docker-hub/builds/advanced/ -# https://web.archive.org/web/20201002130055/https://dev.to/samuelea/automate-your-builds-on-docker-hub-by-writing-a-build-hook-script-13fp - -cut_tag_field() { echo "$DOCKER_TAG" | cut --delimiter="-" --fields="$1"; } - -# Assign some (dynamic) default values if variables undefined. -# This is compatible with the DockerHub infrastructure where these are defined -# (see https://docs.docker.com/docker-hub/builds/advanced/) but also allows easy -# local execution. -: "${DOCKER_TAG:=latest}" # https://stackoverflow.com/a/28085062 - -# This will fail if compiling locally where this env var is (probably) not defined, -# and no command line argument is given: -: "${IMAGE_NAME:=$1}" # https://stackoverflow.com/a/28085062 - -echo "Using Docker tag '$DOCKER_TAG'." -echo "Building with image name '$IMAGE_NAME'." - -if [[ "$DOCKER_TAG" == "latest" ]] -then - # Default OS: - BASE_OS="debian" - # `debian:latest` will get latest *stable*, which has between 1.5 to 2 years old, - # well-tested software. While that is suitable for servers etc., this Docker image - # does not need highest stability. More recent features are more important (e.g. for - # pandoc). Debian's `testing` branch sounds cutting-edge but is roughly 6 months old - # software, so should be stable enough here. - # This image's main component, TeXLive, is largely unaffected by this anyway. - OS_VERSION="testing" - # Installation script takes care of finding the appropriate version of TeXLive - # for the 'latest' tag: - TL_VERSION="$DOCKER_TAG" -else - # Otherwise, take versions as manually specified in build process. - # - # This assumes tags in the form: '--texlive-', - # e.g. 'debian-10-texlive-2019' - # - # E.g. 'debian' - BASE_OS=$(cut_tag_field 1) - # Version e.g. '10' for Debian, but can also be 'buster', see: - # https://wiki.debian.org/DebianReleases - # These are the available versions: - # https://hub.docker.com/_/debian?tab=tags - OS_VERSION=$(cut_tag_field 2) - # E.g. '2020': - TL_VERSION=$(cut_tag_field 4) -fi - -docker build \ - --build-arg BASE_OS="$BASE_OS" \ - --build-arg OS_VERSION="$OS_VERSION" \ - --build-arg TL_VERSION="$TL_VERSION" \ - --tag "$IMAGE_NAME" \ - . diff --git a/docker/tex/minimal-working-example.tex b/docker/tex/minimal-working-example.tex deleted file mode 100644 index 224fbc9..0000000 --- a/docker/tex/minimal-working-example.tex +++ /dev/null @@ -1,5 +0,0 @@ -\documentclass{article} - -\begin{document} - Hello World! -\end{document}