-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
73 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,56 @@ | ||
FROM ubuntu:focal | ||
FROM ubuntu:jammy | ||
|
||
LABEL Description="Dockerized MiKTeX, Ubuntu 22.04" Vendor="Christian Schenk" Version="23.4" | ||
LABEL Description="Dockerized MiKTeX, Ubuntu 22.04" | ||
LABEL Vendor="Christian Schenk" | ||
LABEL Version="23.10.5" | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
ARG user=miktex | ||
ARG group=miktex | ||
ARG uid=1000 | ||
ARG gid=1000 | ||
|
||
ARG miktex_home=/var/lib/miktex | ||
ARG miktex_work=/miktex/work | ||
|
||
RUN groupadd -g ${gid} ${group} \ | ||
&& useradd -d "${miktex_home}" -u ${uid} -g ${gid} -m -s /bin/bash ${user} | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
curl \ | ||
dirmngr \ | ||
ghostscript \ | ||
gnupg \ | ||
gosu \ | ||
make \ | ||
perl | ||
|
||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D6BC243565B2087BC3F897C9277A7293F59E4889 | ||
RUN echo "deb http://miktex.org/download/ubuntu jammy universe" | tee /etc/apt/sources.list.d/miktex.list | ||
RUN curl -fsSL https://miktex.org/download/key | tee /usr/share/keyrings/miktex-keyring.asc > /dev/null \ | ||
&& echo "deb [signed-by=/usr/share/keyrings/miktex-keyring.asc] https://miktex.org/download/ubuntu jammy universe" | tee /etc/apt/sources.list.d/miktex.list | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install -y --no-install-recommends \ | ||
miktex | ||
|
||
USER ${user} | ||
|
||
RUN miktexsetup finish \ | ||
&& initexmf --admin --set-config-value=[MPM]AutoInstall=1 \ | ||
&& mpm --admin --update-db \ | ||
&& mpm --admin \ | ||
--install amsfonts \ | ||
--install biber-linux-x86_64 \ | ||
&& initexmf --admin --update-fndb | ||
&& initexmf --set-config-value=[MPM]AutoInstall=1 \ | ||
&& miktex packages update \ | ||
&& miktex packages install amsfonts | ||
|
||
VOLUME [ "${miktex_home}" ] | ||
|
||
WORKDIR ${miktex_work} | ||
|
||
USER root | ||
|
||
COPY entrypoint.sh / | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
ENV MIKTEX_USERCONFIG=/miktex/.miktex/texmfs/config | ||
ENV MIKTEX_USERDATA=/miktex/.miktex/texmfs/data | ||
ENV MIKTEX_USERINSTALL=/miktex/.miktex/texmfs/install | ||
|
||
WORKDIR /miktex/work | ||
ENV PATH=/var/lib/miktex/bin:${PATH} | ||
|
||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM miktex/miktex:latest | ||
|
||
LABEL Description="Dockerized MiKTeX, Ubuntu 22.04" | ||
LABEL Vendor="Christian Schenk" | ||
LABEL Version="23.10.6" | ||
|
||
RUN mpm --package-level=basic --upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "${MIKTEX_UID}" ]; then | ||
exec "$@" | ||
else | ||
MIKTEX_GID=${MIKTEX_GID:-${MIKTEX_UID}} | ||
groupadd -g "${MIKTEX_GID}" -o miktex | ||
useradd --shell /bin/bash -u "${MIKTEX_UID}" -g "${MIKTEX_GID}" -o -c "" -Md /miktex miktex | ||
mkdir -p /miktex/.miktex | ||
chown -R miktex:miktex /miktex/.miktex | ||
exec gosu miktex "$@" | ||
MIKTEX_UID=${MIKTEX_UID:-1000} | ||
MIKTEX_GID=${MIKTEX_GID:-${MIKTEX_UID}} | ||
if [ "$(id -u miktex)" != 1000 ]; then | ||
usermod -u ${MIKTEX_UID} miktex >/dev/null | ||
groupmod -g ${MIKTEX_GID} miktex | ||
chown -R miktex:miktex /var/lib/miktex | ||
fi | ||
exec gosu miktex "$@" |