Skip to content

Commit

Permalink
Allow users to build the docker image by providing uid and gid as bui…
Browse files Browse the repository at this point in the history
…ld args.
  • Loading branch information
varshavaradarajan committed Sep 11, 2017
1 parent a72bb1e commit 90d8bc8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ EXPOSE 8153 8154
# force encoding
ENV LANG=en_US.utf8

ARG UID=1000
ARG GID=1000

RUN \
# add our user and group first to make sure their IDs get assigned consistently,
# regardless of whatever dependencies get added
addgroup -g 1000 go && \
adduser -D -u 1000 -G go go && \
addgroup -g ${GID} go && \
adduser -D -u ${UID} -G go go && \
# install dependencies and other helpful CLI tools
apk --no-cache upgrade && \
apk add --no-cache openjdk8-jre-base git mercurial subversion tini openssh-client bash su-exec curl && \
Expand Down

0 comments on commit 90d8bc8

Please sign in to comment.