-
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.
Create 'miktex' user in entrypoint.sh
- Loading branch information
Showing
3 changed files
with
40 additions
and
13 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,25 +1,35 @@ | ||
FROM ubuntu:xenial | ||
FROM ubuntu:bionic | ||
|
||
LABEL Description="Dockerized MiKTeX, Ubuntu 16.04" Vendor="Christian Schenk" Version="2.9.6628" | ||
|
||
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D6BC243565B2087BC3F897C9277A7293F59E4889 | ||
RUN echo "deb http://miktex.org/download/ubuntu xenial universe" | tee /etc/apt/sources.list.d/miktex.list | ||
LABEL Description="Dockerized MiKTeX, Ubuntu 18.04" Vendor="Christian Schenk" Version="2.9.6970" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
apt-transport-https \ | ||
ca-certificates | ||
ca-certificates \ | ||
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 bionic universe" | tee /etc/apt/sources.list.d/miktex.list | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
miktex \ | ||
perl | ||
miktex | ||
|
||
RUN useradd -md /miktex miktex | ||
USER miktex | ||
RUN miktexsetup finish \ | ||
&& initexmf --admin --set-config-value=[MPM]AutoInstall=1 \ | ||
&& mpm --admin --update-db \ | ||
&& mpm --admin \ | ||
--install amsfonts \ | ||
--install biber-linux-x86_64 | ||
|
||
RUN miktexsetup finish | ||
RUN initexmf --set-config-value=[MPM]AutoInstall=1 | ||
RUN mpm --install amsfonts | ||
COPY entrypoint.sh / | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
WORKDIR /miktex/work | ||
|
||
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
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,12 @@ | ||
#!/bin/sh | ||
|
||
MIKTEX_GID=${MIKTEX_GID:-1001} | ||
MIKTEX_UID=${MIKTEX_UID:-1001} | ||
|
||
groupadd -g $MIKTEX_GID -o miktex | ||
useradd --shell /bin/bash -u $MIKTEX_UID -g $MIKTEX_GID -o -c "" -Md /miktex miktex | ||
|
||
chown miktex:miktex /miktex | ||
chown miktex:miktex /miktex/work | ||
|
||
exec gosu miktex "$@" |