From b39fab350f7de97f3be46f65f7e17ce3fbefb8f7 Mon Sep 17 00:00:00 2001 From: Firas Abuzaid Date: Wed, 11 Apr 2018 22:06:02 -0700 Subject: [PATCH] updated Dockerfile --- Dockerfile | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7dcfe24a2..3ce76b796 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,35 +2,32 @@ FROM ubuntu:16.04 # Install dependencies, including Java 8 and Maven 3 -RUN apt-get update -y -RUN apt-get install -y openjdk-8-jdk -RUN apt-get install -y maven -RUN apt-get install -y wget -RUN apt-get install -y curl -RUN apt-get install -y vim -RUN apt-get install -y pkg-config -RUN apt-get install -y cmake -RUN apt-get install -y build-essential -RUN apt-get install -y tmux -RUN apt-get install -y screen +RUN apt-get update && apt-get install -y \ + build-essential \ + cmake \ + curl \ + git \ + less \ + man-db \ + maven \ + openjdk-8-jdk \ + pkg-config \ + screen \ + sudo \ + tmux \ + vim \ + wget -# Setup home environment -RUN useradd ubuntu -RUN mkdir /home/ubuntu && chown -R ubuntu: /home/ubuntu +# Setup home environment and password-less sudo access for user "ubuntu" +RUN adduser --home /home/ubuntu --disabled-password --gecos '' ubuntu +RUN adduser ubuntu sudo +RUN echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers WORKDIR /home/ubuntu ENV HOME /home/ubuntu -ADD .bashrc /home/ubuntu/.bashrc USER ubuntu # Setup MacroBase -RUN cd /home/ubuntu && wget https://github.com/stanford-futuredata/macrobase/archive/v0.5.tar.gz -RUN cd /home/ubuntu && tar xvf v0.5.tar.gz -RUN cd /home/ubuntu/macrobase-0.5 && ./build.sh core sql - -# Create a shared data volume. We need to create an empty file, otherwise the -# volume will belong to root. (This is probably a Docker bug.) -RUN mkdir /var/shared/ -RUN touch /var/shared/placeholder -RUN chown -R ubuntu:ubuntu /var/shared -VOLUME /var/shared +RUN cd /home/ubuntu && wget https://github.com/stanford-futuredata/macrobase/archive/v1.0.tar.gz +RUN cd /home/ubuntu && tar xvf v1.0.tar.gz +RUN cd /home/ubuntu/macrobase-1.0 && ./build.sh core sql