diff --git a/Dockerfile b/Dockerfile index 47c1eea..68cb551 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,12 @@ FROM ubuntu:trusty # Grab the bare necessities for installing RVM and some Rubies RUN apt-get update && \ apt-get install -yq git build-essential curl gnupg && \ - gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 && \ + useradd -c "RVM User" -d /home/rvm -G sudo -s /bin/bash -m rvm + +USER rvm + +RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 && \ curl -sSL https://get.rvm.io | bash -s stable -COPY rvmrc /root/.rvmrc +COPY sudoers /etc/sudoers.d/10-sudo-nopasswd +COPY rvmrc /home/rvm/.rvmrc diff --git a/build-rubies.sh b/build-rubies.sh index a882bbb..1884021 100755 --- a/build-rubies.sh +++ b/build-rubies.sh @@ -11,7 +11,7 @@ for RUBY in "${RUBIES[@]}"; do cat > $DOCKERFILE < Making ${IMAGE_TAG}:${RUBY}" diff --git a/sudoers b/sudoers new file mode 100644 index 0000000..c48a2fb --- /dev/null +++ b/sudoers @@ -0,0 +1 @@ +%sudo ALL=(ALL) NOPASSWD: ALL