Skip to content

Commit cd2f271

Browse files
authored
v0.2.0
2 parents 307aa63 + 8455156 commit cd2f271

File tree

9 files changed

+163
-123
lines changed

9 files changed

+163
-123
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sh text eol=lf

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* @Paebbels
2+
3+
/.github/ @Paebbels

.github/dependabot.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ updates:
88
prefix: "[Dependabot]"
99
labels:
1010
- Dependencies
11-
reviewers:
12-
- Paebbels
1311
schedule:
14-
interval: "daily" # Checks on Monday trough Friday.
12+
interval: "weekly"
1513

1614
# Maintain GitHub Action runners
1715
- package-ecosystem: "github-actions"
@@ -21,11 +19,5 @@ updates:
2119
prefix: "[Dependabot]"
2220
labels:
2321
- Dependencies
24-
assignees:
25-
- Paebbels
26-
- umarcor
27-
reviewers:
28-
- Paebbels
29-
- umarcor
3022
schedule:
31-
interval: "daily" # Checks on Monday trough Friday.
23+
interval: "weekly"

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* tbd
1919
* tbd
2020

21-
# Unit Tests
21+
# Tests
2222

2323
* tbd
2424
* tbd

.github/workflows/Pipeline.yml

Lines changed: 108 additions & 48 deletions
Large diffs are not rendered by default.

Docker.buildx.sh

Lines changed: 33 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -20,54 +20,39 @@
2020
# See the License for the specific language governing permissions and
2121
# limitations under the License.
2222
# =============================================================================
23-
24-
# work around for Darwin (Mac OS)
25-
READLINK=readlink; if [[ $(uname) == "Darwin" ]]; then READLINK=greadlink; fi
23+
# shellcheck shell=bash
2624

2725
# Save working directory
2826
WorkingDir=$(pwd)
29-
ScriptDir="$($READLINK -f $(dirname $0))"
30-
RootDir="$($READLINK -f $ScriptDir/..)"
31-
32-
ANSI_ENABLE_COLOR() {
33-
ENABLECOLOR='-c '
34-
ANSI_BLACK=$'\x1b[30m'
35-
ANSI_RED=$'\x1b[31m'
36-
ANSI_GREEN=$'\x1b[32m'
37-
ANSI_YELLOW=$'\x1b[33m'
38-
ANSI_BLUE=$'\x1b[34m'
39-
ANSI_MAGENTA=$'\x1b[35m'
40-
ANSI_CYAN=$'\x1b[36m'
41-
ANSI_DARK_GRAY=$'\x1b[90m'
42-
ANSI_LIGHT_GRAY=$'\x1b[37m'
43-
ANSI_LIGHT_RED=$'\x1b[91m'
44-
ANSI_LIGHT_GREEN=$'\x1b[92m'
45-
ANSI_LIGHT_YELLOW=$'\x1b[93m'
46-
ANSI_LIGHT_BLUE=$'\x1b[94m'
47-
ANSI_LIGHT_MAGENTA=$'\x1b[95m'
48-
ANSI_LIGHT_CYAN=$'\x1b[96m'
49-
ANSI_WHITE=$'\x1b[97m'
50-
ANSI_NOCOLOR=$'\x1b[0m'
51-
52-
# red texts
53-
COLORED_ERROR="${ANSI_RED}[ERROR]"
54-
COLORED_FAILED="${ANSI_RED}[FAILED]${ANSI_NOCOLOR}"
27+
ScriptDir="$(readlink -f "$(dirname "$0")")"
28+
RootDir="$(readlink -f "$ScriptDir/..")"
5529

56-
# yellow texts
57-
COLORED_WARNING="${ANSI_YELLOW}[WARNING]"
30+
ANSI_BLACK=$'\x1b[30m'
31+
ANSI_RED=$'\x1b[31m'
32+
ANSI_GREEN=$'\x1b[32m'
33+
ANSI_YELLOW=$'\x1b[33m'
34+
ANSI_BLUE=$'\x1b[34m'
35+
ANSI_MAGENTA=$'\x1b[35m'
36+
ANSI_CYAN=$'\x1b[36m'
37+
ANSI_DARK_GRAY=$'\x1b[90m'
38+
ANSI_LIGHT_GRAY=$'\x1b[37m'
39+
ANSI_LIGHT_RED=$'\x1b[91m'
40+
ANSI_LIGHT_GREEN=$'\x1b[92m'
41+
ANSI_LIGHT_YELLOW=$'\x1b[93m'
42+
ANSI_LIGHT_BLUE=$'\x1b[94m'
43+
ANSI_LIGHT_MAGENTA=$'\x1b[95m'
44+
ANSI_LIGHT_CYAN=$'\x1b[96m'
45+
ANSI_WHITE=$'\x1b[97m'
46+
ANSI_NOCOLOR=$'\x1b[0m'
5847

59-
# green texts
60-
COLORED_PASSED="${ANSI_GREEN}[PASSED]${ANSI_NOCOLOR}"
61-
COLORED_DONE="${ANSI_GREEN}[DONE]${ANSI_NOCOLOR}"
62-
COLORED_SUCCESSFUL="${ANSI_GREEN}[SUCCESSFUL]${ANSI_NOCOLOR}"
63-
}
64-
ANSI_ENABLE_COLOR
48+
# red texts
49+
COLORED_ERROR="${ANSI_RED}[ERROR]"
6550

6651
# command line argument processing
6752
COMMAND=2 # 0-help, 1-unknown option, 2-no arg needed
6853
INDENT=""
6954
VERBOSE=0; DEBUG=0
70-
while [[ $# > 0 ]]; do
55+
while [[ $# -gt 0 ]]; do
7156
key="$1"
7257
case $key in
7358
-i|--indent)
@@ -125,17 +110,24 @@ Pattern_CANCELED='#[0-9]+ CANCELED'
125110
Pattern_Tagging='#[0-9]+ naming to (.*?) done'
126111
Pattern_MIKTEX='#[0-9]+ [0-9]+\.[0-9]+ Installing package'
127112

128-
while IFS='\n' read -r line; do
113+
group=0
114+
while IFS=$'\n' read -r line; do
129115
if [[ "${line}" =~ $Pattern_FROM ]]; then
130-
printf "%s\n" "${INDENT}${ANSI_MAGENTA}${line}${ANSI_NOCOLOR}"
116+
printf "::group::%s\n" "${INDENT}${ANSI_MAGENTA}${line}${ANSI_NOCOLOR}"
117+
group=1
131118
elif [[ "${line}" =~ $Pattern_RUN ]]; then
132-
printf "%s\n" "${INDENT}${ANSI_CYAN}${line}${ANSI_NOCOLOR}"
119+
printf "::group::%s\n" "${INDENT}${ANSI_CYAN}${line}${ANSI_NOCOLOR}"
120+
group=1
133121
elif [[ "${line}" =~ $Pattern_COPY ]]; then
134122
printf "%s\n" "${INDENT}${ANSI_LIGHT_CYAN}${line}${ANSI_NOCOLOR}"
135123
elif [[ "${line}" =~ $Pattern_LABEL_ENV ]]; then
136124
printf "%s\n" "${INDENT}${ANSI_BLUE}${line}${ANSI_NOCOLOR}"
137125
elif [[ "${line}" =~ $Pattern_DONE ]]; then
126+
if [[ $group -eq 1 ]]; then
127+
printf "::endgroup::\n"
128+
fi
138129
printf "%s\n" "${INDENT}${ANSI_GREEN}${line}${ANSI_NOCOLOR}"
130+
group=0
139131
elif [[ "${line}" =~ $Pattern_ERROR ]]; then
140132
printf "%s\n" "${INDENT}${ANSI_LIGHT_RED}${line}${ANSI_NOCOLOR}"
141133
elif [[ "${line}" =~ $Pattern_CANCELED ]]; then

Dockerfile

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1+
# check=skip=InvalidDefaultArgInFrom;error=true
2+
13
ARG IMAGE
2-
ARG OS_VERSION
3-
ARG PY_VERSION
4+
ARG MIKTEX_SRC_REPO
45

56
FROM ${IMAGE}
6-
ARG OS_VERSION
7-
ARG PY_VERSION
8-
9-
# Meta information
10-
LABEL maintainer="Patrick Lehmann <Paebbels@gmail.com>"
11-
LABEL version="0.1"
12-
LABEL description="MikTeX based on Debian ${OS_VERSION} and Python ${PY_VERSION}."
7+
ARG MIKTEX_SRC_REPO
138

149
# Install Debian packages
1510
RUN apt-get update \
@@ -20,10 +15,11 @@ RUN apt-get update \
2015
curl \
2116
&& rm -rf /var/lib/apt/lists/* \
2217
&& apt-get clean
18+
# && apt-get dist-clean
2319

2420
# Install MikTeX
25-
RUN curl -fsSL https://miktex.org/download/key | tee /usr/share/keyrings/miktex-keyring.asc > /dev/null
26-
RUN echo "deb [signed-by=/usr/share/keyrings/miktex-keyring.asc] https://miktex.org/download/debian ${OS_VERSION} universe" | tee /etc/apt/sources.list.d/miktex.list
21+
RUN curl -fsSL https://miktex.org/download/key | gpg --dearmor -o /usr/share/keyrings/miktex.gpg
22+
RUN echo "deb [signed-by=/usr/share/keyrings/miktex.gpg] https://miktex.org/download/debian bookworm universe" | tee /etc/apt/sources.list.d/miktex.list
2723
RUN apt-get update \
2824
&& apt-get install -y --no-install-recommends \
2925
ghostscript \
@@ -32,6 +28,7 @@ RUN apt-get update \
3228
miktex \
3329
&& rm -rf /var/lib/apt/lists/* \
3430
&& apt-get clean
31+
# && apt-get dist-clean
3532

3633
# Install executables like lualatex into /usr/local/bin
3734
RUN miktexsetup --shared=yes finish
@@ -49,4 +46,4 @@ ENV MIKTEX_USERCONFIG=/miktex/.miktex/texmfs/config
4946
ENV MIKTEX_USERDATA=/miktex/.miktex/texmfs/data
5047
ENV MIKTEX_USERINSTALL=/miktex/.miktex/texmfs/install
5148

52-
ENTRYPOINT /bin/bash -l
49+
ENV MIKTEX_MAINT_GIVEUP_AFTER_DAYS=9999

Dockerfile.Specific

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1+
# check=skip=InvalidDefaultArgInFrom;error=true
2+
13
ARG IMAGE
2-
ARG BASE_VARIANT
3-
ARG VARIANT
44

55
FROM ${IMAGE}
6-
ARG BASE_VARIANT
7-
ARG VARIANT
8-
9-
# Meta information
10-
LABEL maintainer="Patrick Lehmann <Paebbels@gmail.com>"
11-
LABEL version="0.1"
12-
LABEL description="MikTeX with preinstalled packages for ${VARIANT} based on ${BASE_VARIANT}."
136

147
RUN --mount=type=bind,target=/context \
158
miktex --admin --verbose packages update-package-database \

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# MikTeX Docker Image
22

3-
This repository is based on [Debian 12.x Bookworm (slim) with Python 3.13](https://hub.docker.com/_/python).
3+
This repository is based on [Debian 12.x Bookworm (slim) with Python 3.14](https://hub.docker.com/_/python).
4+
5+
Docker Hub: https://hub.docker.com/r/pytooling/miktex
46

57
## Usage
68

@@ -18,7 +20,7 @@ Installed additional tools are:
1820
* MikTeX
1921
* Preinstalled packages: [Common.list](Common.list)
2022
* Perl
21-
* Python 3.13
23+
* Python 3.14
2224

2325
## Why another MikTeX Docker Image?
2426

0 commit comments

Comments
 (0)