File tree Expand file tree Collapse file tree 4 files changed +23
-14
lines changed Expand file tree Collapse file tree 4 files changed +23
-14
lines changed Original file line number Diff line number Diff line change 5454
5555 - name : Build pdf using docker image
5656 run : |
57- docker run --rm -v "$(pwd):/home/porter/ app" --name maths --user root --hostname latex latex sh ./deploy.sh --parallel --production --dist-dir="web/dist" --cache-uri="https://maths .nrv.nu/pdf/archive.tar.gz"
57+ docker run --rm -v "$(pwd):/app" --name maths --user root --hostname latex latex sh ./deploy.sh --parallel --production --dist-dir="web/dist" --cache-uri="https://notes .nrv.nu/pdf/archive.tar.gz"
5858
5959 - name : Upload site artifact
6060 uses : actions/upload-pages-artifact@v2
Original file line number Diff line number Diff line change 11FROM alpine:latest
22
3- RUN apk update && apk upgrade;\
4- apk add doas;\
5- adduser -g 'Porter' porter;\
6- echo "porter:" | chpasswd;\
7- adduser porter wheel;\
3+ # Set environment variables for UID and GID (can be passed at runtime)
4+ ARG USER_ID=1000
5+ ARG GROUP_ID=1000
6+
7+ # Update packages and add required utilities
8+ RUN apk update && apk upgrade; \
9+ apk add doas; \
10+ addgroup -g ${GROUP_ID} porter; \
11+ adduser -D -u ${USER_ID} -G porter -g 'Porter' porter; \
12+ echo "porter:" | chpasswd; \
13+ addgroup porter wheel; \
814 echo "permit persist :wheel" > "/etc/doas.d/doas.conf"
915
1016# Run system config script
@@ -24,18 +30,17 @@ COPY compile.sh /home/porter
2430RUN chown -R porter /home/porter/.docker &&\
2531 chown porter /home/porter/compile.sh
2632
33+ RUN mkdir -p /app
34+ RUN chown -R porter /app
35+
2736USER porter
2837WORKDIR /home/porter
2938
30- # # Set zsh as default shell
31- # RUN echo "porter:" | chsh -s $(which zsh) porter
32-
3339# Run setup.sh as porter
3440RUN sh .docker/setup.sh
3541
3642# Set final working directory
37- RUN mkdir -p /home/porter/app
38- WORKDIR /home/porter/app
43+ WORKDIR /app
3944
4045CMD ["zsh" ]
4146
Original file line number Diff line number Diff line change 1- # Math Notes
1+ # Notes
22
33Alpine container with LaTeX and neovim installation.
44
@@ -10,12 +10,16 @@ Build docker image.
1010docker build -t latex .
1111```
1212
13+ ``` sh
14+ docker build --build-arg USER_ID=$( id -u) --build-arg GROUP_ID=$( id -g) -t latex .
15+ ```
16+
1317## Run
1418
1519Start latex docker image.
1620
1721``` sh
18- docker run -it --rm -v " $( pwd) :/home/porter/ app" --hostname latex --name maths latex
22+ docker run -it --rm -v " $( pwd) :/app" --name maths latex
1923```
2024
2125## Python Environment
Original file line number Diff line number Diff line change 3636 </div >
3737 <div class =' fixed bottom-0 right-0 p-4 hover:text-blue-nordic' >
3838 <a class =' mx-auto hover:underline hover:text-blue-400 transition-all duration-150 font-light'
39- href =' https://github.com/mnerv/maths '
39+ href =' https://github.com/mnerv/notes '
4040 title =' Open Github repository'
4141 target =' _blank' >
4242 <Icon icon =" bi:github" />
You can’t perform that action at this time.
0 commit comments