File tree 4 files changed +23
-14
lines changed
4 files changed +23
-14
lines changed Original file line number Diff line number Diff line change 54
54
55
55
- name : Build pdf using docker image
56
56
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"
58
58
59
59
- name : Upload site artifact
60
60
uses : actions/upload-pages-artifact@v2
Original file line number Diff line number Diff line change 1
1
FROM alpine:latest
2
2
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; \
8
14
echo "permit persist :wheel" > "/etc/doas.d/doas.conf"
9
15
10
16
# Run system config script
@@ -24,18 +30,17 @@ COPY compile.sh /home/porter
24
30
RUN chown -R porter /home/porter/.docker &&\
25
31
chown porter /home/porter/compile.sh
26
32
33
+ RUN mkdir -p /app
34
+ RUN chown -R porter /app
35
+
27
36
USER porter
28
37
WORKDIR /home/porter
29
38
30
- # # Set zsh as default shell
31
- # RUN echo "porter:" | chsh -s $(which zsh) porter
32
-
33
39
# Run setup.sh as porter
34
40
RUN sh .docker/setup.sh
35
41
36
42
# Set final working directory
37
- RUN mkdir -p /home/porter/app
38
- WORKDIR /home/porter/app
43
+ WORKDIR /app
39
44
40
45
CMD ["zsh" ]
41
46
Original file line number Diff line number Diff line change 1
- # Math Notes
1
+ # Notes
2
2
3
3
Alpine container with LaTeX and neovim installation.
4
4
@@ -10,12 +10,16 @@ Build docker image.
10
10
docker build -t latex .
11
11
```
12
12
13
+ ``` sh
14
+ docker build --build-arg USER_ID=$( id -u) --build-arg GROUP_ID=$( id -g) -t latex .
15
+ ```
16
+
13
17
## Run
14
18
15
19
Start latex docker image.
16
20
17
21
``` 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
19
23
```
20
24
21
25
## Python Environment
Original file line number Diff line number Diff line change 36
36
</div >
37
37
<div class =' fixed bottom-0 right-0 p-4 hover:text-blue-nordic' >
38
38
<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 '
40
40
title =' Open Github repository'
41
41
target =' _blank' >
42
42
<Icon icon =" bi:github" />
You can’t perform that action at this time.
0 commit comments