7 Commits

3 changed files with 44 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ ARG CODE_RELEASE
LABEL build_version="version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="musabe24"
# environment settings
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ENV HOME="/config"
@@ -21,7 +21,13 @@ RUN \
nano \
net-tools \
netcat \
texlive-full \
texlive-base \
texlive-extra-utils \
texlive-latex-base \
texlive-latex-extra \
texlive-latex-recommended \
texlive-science \
latexmk\
sudo
RUN \

17
docker-compose.yaml Normal file
View File

@@ -0,0 +1,17 @@
version: "2.1"
services:
docker-latex-server:
build:
context: .
container_name: docker-latex-server
restart: unless-stopped
environment:
- TZ=Europe/Berlin
- PASSWORD=myPassword # optional
volumes:
- config:/config
ports:
- 443:8443
volumes:
config:

View File

@@ -1,5 +1,22 @@
#!/bin/bash
# Starten des code-server
# Überprüfen, ob eine PASSWORD Umgebungsvariable gesetzt ist
if [ -z "$PASSWORD" ]; then
echo "Starte Code Server ohne Passwort..."
# Konfiguration für keinen Authentifizierungsmodus
echo "bind-addr: 0.0.0.0:8443
auth: none
password:" > /config/code-server/config.yaml
else
echo "Starte Code Server mit Passwort..."
# Konfiguration für Passwort-Authentifizierungsmodus
echo "bind-addr: 0.0.0.0:8443
auth: password
password: $PASSWORD" > /config/code-server/config.yaml
fi
# Die ID der Extension, die installiert werden soll
EXTENSION_ID="james-yu.latex-workshop"
@@ -11,5 +28,5 @@ else
echo "Extension ${EXTENSION_ID} ist bereits installiert."
fi
# Starten des code-server
exec code-server --bind-addr 0.0.0.0:8443 --auth none
# Starte den Code Server mit der Konfigurationsdatei
code-server --config /config/code-server/config.yaml