From df4e3f1c78a9078f9b386b8c24f4c16695ff3c5f Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Sat, 28 Mar 2020 04:56:23 +0100 Subject: [PATCH] Use build args to reduce number of Dockerfiles --- ctan/Dockerfile | 6 ++++++ ctan/Dockerfile.basic | 3 --- ctan/Dockerfile.context | 3 --- ctan/Dockerfile.full | 3 --- ctan/Dockerfile.gust | 3 --- ctan/Dockerfile.medium | 3 --- ctan/Dockerfile.minimal | 3 --- ctan/Dockerfile.small | 3 --- ctan/Dockerfile.tetex | 3 --- ctan/run.bat | 8 ++++++++ 10 files changed, 14 insertions(+), 24 deletions(-) create mode 100644 ctan/Dockerfile delete mode 100644 ctan/Dockerfile.basic delete mode 100644 ctan/Dockerfile.context delete mode 100644 ctan/Dockerfile.full delete mode 100644 ctan/Dockerfile.gust delete mode 100644 ctan/Dockerfile.medium delete mode 100644 ctan/Dockerfile.minimal delete mode 100644 ctan/Dockerfile.small delete mode 100644 ctan/Dockerfile.tetex create mode 100644 ctan/run.bat diff --git a/ctan/Dockerfile b/ctan/Dockerfile new file mode 100644 index 0000000..bd8815b --- /dev/null +++ b/ctan/Dockerfile @@ -0,0 +1,6 @@ +ARG SOURCE=infraonly + +FROM icaotix/latex:$SOURCE +ARG SCHEME=minimal + +RUN tlmgr install scheme-${SCHEME} \ No newline at end of file diff --git a/ctan/Dockerfile.basic b/ctan/Dockerfile.basic deleted file mode 100644 index 336e06e..0000000 --- a/ctan/Dockerfile.basic +++ /dev/null @@ -1,3 +0,0 @@ -FROM icaotix/latex:minimal - -RUN tlmgr install scheme-basic diff --git a/ctan/Dockerfile.context b/ctan/Dockerfile.context deleted file mode 100644 index 125a1b4..0000000 --- a/ctan/Dockerfile.context +++ /dev/null @@ -1,3 +0,0 @@ -FROM icaotix/latex:small - -RUN tlmgr install scheme-context diff --git a/ctan/Dockerfile.full b/ctan/Dockerfile.full deleted file mode 100644 index eb2163e..0000000 --- a/ctan/Dockerfile.full +++ /dev/null @@ -1,3 +0,0 @@ -FROM icaotix/latex:tetex - -RUN tlmgr install scheme-full \ No newline at end of file diff --git a/ctan/Dockerfile.gust b/ctan/Dockerfile.gust deleted file mode 100644 index 4a3916d..0000000 --- a/ctan/Dockerfile.gust +++ /dev/null @@ -1,3 +0,0 @@ -FROM icaotix/latex:context - -RUN tlmgr install scheme-gust \ No newline at end of file diff --git a/ctan/Dockerfile.medium b/ctan/Dockerfile.medium deleted file mode 100644 index e5052eb..0000000 --- a/ctan/Dockerfile.medium +++ /dev/null @@ -1,3 +0,0 @@ -FROM icaotix/latex:gust - -RUN tlmgr install scheme-medium diff --git a/ctan/Dockerfile.minimal b/ctan/Dockerfile.minimal deleted file mode 100644 index c16dfb7..0000000 --- a/ctan/Dockerfile.minimal +++ /dev/null @@ -1,3 +0,0 @@ -FROM icaotix/latex:infraonly - -RUN tlmgr install scheme-minimal diff --git a/ctan/Dockerfile.small b/ctan/Dockerfile.small deleted file mode 100644 index a119f75..0000000 --- a/ctan/Dockerfile.small +++ /dev/null @@ -1,3 +0,0 @@ -FROM icaotix/latex:basic - -RUN tlmgr install scheme-small diff --git a/ctan/Dockerfile.tetex b/ctan/Dockerfile.tetex deleted file mode 100644 index 7d3af10..0000000 --- a/ctan/Dockerfile.tetex +++ /dev/null @@ -1,3 +0,0 @@ -FROM icaotix/latex:medium - -RUN tlmgr install scheme-tetex diff --git a/ctan/run.bat b/ctan/run.bat new file mode 100644 index 0000000..3809c6a --- /dev/null +++ b/ctan/run.bat @@ -0,0 +1,8 @@ +docker build -t icaotix/latex:minimal --build-arg SOURCE=infraonly --build-arg SCHEME=minimal . +docker build -t icaotix/latex:basic --build-arg SOURCE=minimal --build-arg SCHEME=basic . +docker build -t icaotix/latex:small --build-arg SOURCE=basic --build-arg SCHEME=small . +docker build -t icaotix/latex:context --build-arg SOURCE=small --build-arg SCHEME=context . +docker build -t icaotix/latex:gust --build-arg SOURCE=context --build-arg SCHEME=gust . +docker build -t icaotix/latex:medium --build-arg SOURCE=gust --build-arg SCHEME=medium . +docker build -t icaotix/latex:tetex --build-arg SOURCE=medium --build-arg SCHEME=tetex . +docker build -t icaotix/latex:full --build-arg SOURCE=tetex --build-arg SCHEME=full . \ No newline at end of file