Skip to content

Commit be1ac57

Browse files
committed
docker helper: set uid and gid
1 parent 9d3ffff commit be1ac57

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ image:
1010
shell:
1111
${DOCKER} run --rm -it \
1212
-p 4000:4000 \
13+
-u `id -u`:`id -g` \
1314
-v ${PWD}:/src/gh/pages-gem \
1415
${TAG} \
1516
/bin/bash
@@ -22,6 +23,7 @@ server:
2223
(echo -E "specify SITE e.g.: SITE=/path/to/site make server"; exit 1) && \
2324
${DOCKER} run --rm -it \
2425
-p 4000:4000 \
26+
-u `id -u`:`id -g` \
2527
-v ${PWD}:/src/gh/pages-gem \
2628
-v `realpath ${SITE}`:/src/site \
2729
-w /src/site \

contrib/func.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@
55
function github-pages {
66
_path=${1:-.}
77
_port=${2:-4000}
8-
docker run --rm -v `realpath $_path`:/src/site -p $_port:4000 gh-pages
8+
docker run --rm \
9+
-p $_port:4000 \
10+
-u `id -u`:`id -g` \
11+
-v `realpath $_path`:/src/site \
12+
gh-pages
913
}

0 commit comments

Comments
 (0)