Skip to content

Commit

Permalink
docker helper: set uid and gid
Browse files Browse the repository at this point in the history
  • Loading branch information
vidbina committed Nov 27, 2017
1 parent 9d3ffff commit be1ac57
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ image:
shell:
${DOCKER} run --rm -it \
-p 4000:4000 \
-u `id -u`:`id -g` \
-v ${PWD}:/src/gh/pages-gem \
${TAG} \
/bin/bash
Expand All @@ -22,6 +23,7 @@ server:
(echo -E "specify SITE e.g.: SITE=/path/to/site make server"; exit 1) && \
${DOCKER} run --rm -it \
-p 4000:4000 \
-u `id -u`:`id -g` \
-v ${PWD}:/src/gh/pages-gem \
-v `realpath ${SITE}`:/src/site \
-w /src/site \
Expand Down
6 changes: 5 additions & 1 deletion contrib/func.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
function github-pages {
_path=${1:-.}
_port=${2:-4000}
docker run --rm -v `realpath $_path`:/src/site -p $_port:4000 gh-pages
docker run --rm \
-p $_port:4000 \
-u `id -u`:`id -g` \
-v `realpath $_path`:/src/site \
gh-pages
}

0 comments on commit be1ac57

Please sign in to comment.