diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2020-06-21 12:20:42 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2020-06-21 12:20:42 -0700 |
commit | 1909e316dcf89c0a36434091e241eaa5d17bdb83 (patch) | |
tree | f790e056b394292e08017be5ca21be1f1199e288 /bin | |
parent | bin: bundle install needs network (diff) | |
download | www-1909e316dcf89c0a36434091e241eaa5d17bdb83.tar.gz www-1909e316dcf89c0a36434091e241eaa5d17bdb83.tar.bz2 www-1909e316dcf89c0a36434091e241eaa5d17bdb83.zip |
Docker: large refactor & improvements
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/docker-helper.inc | 11 | ||||
-rwxr-xr-x | bin/docker-setup.sh | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/bin/docker-helper.inc b/bin/docker-helper.inc index d084d2e..a1bc41f 100644 --- a/bin/docker-helper.inc +++ b/bin/docker-helper.inc @@ -5,7 +5,7 @@ TRACE=${TRACE:=0} IMAGE_NAME=docker.gentoo.org/sites/www IMAGE_TAG=latest IMAGE=${IMAGE_NAME}:${IMAGE_TAG} -IMAGE_SRC=docker/ +IMAGE_SRC=./ docker_build() { # Always refresh the image @@ -17,10 +17,15 @@ docker_build() { } _docker_run_common() { + _UID=$(id -u) + _GID=$(id -g) docker run \ --rm \ - -e JEKYLL_UID="$(id -u)" \ - -e JEKYLL_GID="$(id -g)" \ + -e JEKYLL_UID="${_UID}" \ + -e JEKYLL_GID="${_GID}" \ + -e JEKYLL_ROOTLESS= \ + -e CONNECTED=false \ + -e DEBUG=false \ --volume="${PWD}:/srv/jekyll" \ "$@" } diff --git a/bin/docker-setup.sh b/bin/docker-setup.sh index 217425d..7722a53 100755 --- a/bin/docker-setup.sh +++ b/bin/docker-setup.sh @@ -2,5 +2,3 @@ set -e source "$(dirname "$0")"/docker-helper.inc docker_build -docker_run_net_host bundle install - |