Commit 6218c13a authored by nimrod's avatar nimrod
Browse files

Use the runas entrypoint downloaded from my blog.

parent 349dadec
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
.git/
.gitignore
.dockerignore
*.md
*.dot
*.pdf
example/
*.swp
Dockerfile
*
+6 −5
Original line number Diff line number Diff line
@@ -21,8 +21,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
        texlive-luatex \
        texlive-publishers && \
    rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* /var/cache/apt/archives/*
VOLUME /project
WORKDIR /project
COPY entrypoint /entrypoint
ENTRYPOINT ["/entrypoint"]
ADD [ "https://www.shore.co.il/blog/static/runas", "/entrypoint" ]
ENTRYPOINT [ "/bin/sh", "/entrypoint" ]
VOLUME /volume
WORKDIR /volume
ENV HOME /volume
CMD [ "on-change", ".", "make" ]
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ Markdown or DOT).
`docker run -itv "$PWD:/project" adarnimrod/presentation`

Will watch the current directory and run `make` whenever a file changes. One can
add a shell alias `alias presentation='docker run -itv "$PWD:/project"
add a shell alias `alias presentation='docker run -itv "$PWD:/volume"
adarnimrod/presentation'` for easier use.

See the example folder for more details.

entrypoint

deleted100755 → 0
+0 −5
Original line number Diff line number Diff line
#!/bin/sh
set -eu
uid="$(stat . --format '%u')"
gid="$(stat . --format '%g')"
sudo -Eu "#$uid" -g "#$gid" -- "$@"
+2 −2
Original line number Diff line number Diff line
@@ -7,8 +7,8 @@ An example presentation written in Markdown and DOT.
To watch the current directory and build the presentation whenever a change
occurs

`docker run -tv "$PWD:/project" adarnimrod/presentation`
`docker run -tv "$PWD:/volume" adarnimrod/presentation`

To build the presentation and exit

`docker run -tv "$PWD:/project" adarnimrod/presentation make`
`docker run -tv "$PWD:/volume" adarnimrod/presentation make`