diff options
author | Stephen Finucane <stephen@that.guru> | 2019-10-15 13:41:20 +0100 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2019-10-17 12:02:39 +0100 |
commit | b4f4c8554c1168ffe177dc11ddf9ff1535c1ff31 (patch) | |
tree | 57e9d2f7c00986a84ddb6d41a47dda32320c1ac4 /tools/docker/Dockerfile | |
parent | 77d10d311f022f7b63bc0a66570837fe5fb6c43f (diff) | |
download | patchwork-b4f4c8554c1168ffe177dc11ddf9ff1535c1ff31.tar patchwork-b4f4c8554c1168ffe177dc11ddf9ff1535c1ff31.tar.gz |
docker: Require GID also
If you don't do this, created files end up with a group of 'gcc' or
whatever group has an ID of 1000.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'tools/docker/Dockerfile')
-rw-r--r-- | tools/docker/Dockerfile | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 550871b..6167813 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -1,11 +1,13 @@ FROM ubuntu:18.04 ARG UID +ARG GID # make sure the user has configured the '.env' file and quick fail if not -RUN echo $UID -RUN [ -n "$UID" ] || { echo "You must define UID in .env" 1>&2; exit 1; } +RUN echo $UID; echo $GID; \ + [ -n "$UID" ] || { echo "You must define UID in .env" 1>&2; exit 1; }; \ + [ -n "$GID" ] || { echo "You must define GID in .env" 1>&2; exit 1; } ARG TZ="Australia/Canberra" ENV LANG="C.UTF-8" @@ -18,8 +20,9 @@ ENV PYTHONUNBUFFERED 1 ENV PROJECT_HOME /home/patchwork/patchwork ENV DJANGO_SETTINGS_MODULE patchwork.settings.dev -RUN useradd --uid=$UID --create-home patchwork -RUN rm /etc/localtime; ln -s /usr/share/zoneinfo/$TZ /etc/localtime +RUN groupadd --gid=$GID patchwork && \ + useradd --uid=$UID --gid=$GID --create-home patchwork +RUN rm -f /etc/localtime; ln -s /usr/share/zoneinfo/$TZ /etc/localtime RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ |