Skip to content
Snippets Groups Projects
Commit 44234ad7 authored by nimrod's avatar nimrod
Browse files

Merge branch 'runas'

parents 349dadec 6218c13a
No related branches found
No related tags found
No related merge requests found
.git/
.gitignore
.dockerignore
*.md
*.dot
*.pdf
example/
*.swp
Dockerfile
*
......@@ -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"]
CMD ["on-change", ".", "make"]
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" ]
......@@ -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.
......
#!/bin/sh
set -eu
uid="$(stat . --format '%u')"
gid="$(stat . --format '%g')"
sudo -Eu "#$uid" -g "#$gid" -- "$@"
......@@ -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`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment