Created
January 20, 2017 12:10
-
-
Save gelias/bdd796ed6c82b9b166f4b9e5b00c3301 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:14.04 | |
| # SO requeriments | |
| RUN sudo apt-get update -y | |
| RUN apt-get install -y wget curl git python-virtualenv | |
| RUN sudo echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list | |
| RUN sudo wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| RUN sudo apt-get update -y | |
| RUN apt-get install -y google-chrome-stable | |
| # Replace 1000 with your user / group id | |
| RUN export uid=1000 gid=1000 && \ | |
| mkdir -p /home/developer && \ | |
| echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \ | |
| echo "developer:x:${uid}:" >> /etc/group && \ | |
| echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \ | |
| chmod 0440 /etc/sudoers.d/developer && \ | |
| chown ${uid}:${gid} -R /home/developer | |
| USER developer | |
| ENV HOME /home/developer | |
| # Install rvm & ruby | |
| RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
| RUN curl -sSL https://get.rvm.io | bash -s stable --ruby=2.3.3 | |
| RUN /home/developer/.rvm/bin/rvm -v | |
| RUN sudo ln -sf /home/developer/.rvm/bin/rvm /bin/rvm | |
| RUN rvm -v | |
| RUN sudo ln -sf /home/developer/.rvm/rubies/ruby-2.3.3/bin/ruby /bin/ruby | |
| RUN ruby -v | |
| # RubyGems | |
| RUN cd /tmp && \ | |
| wget https://rubygems.org/rubygems/rubygems-2.6.8.tgz && \ | |
| sudo tar -xzvf rubygems-2.6.8.tgz && \ | |
| cd rubygems-2.6.8 && \ | |
| ruby setup.rb | |
| RUN sudo ln -sf /home/developer/.rvm/rubies/ruby-2.3.3/bin/gem /bin/gem | |
| RUN gem -v | |
| RUN gem list | |
| RUN gem install bundler | |
| # bitbucket ssh key settings | |
| RUN mkdir -p ~/.ssh | |
| RUN chmod -R 777 ~/.ssh | |
| ADD id_rsa /home/developer/.ssh/id_rsa | |
| RUN sudo chown -R developer:developer ~/.ssh | |
| RUN sudo ssh-keyscan bitbucket.org > ~/.ssh/known_hosts | |
| # clone repo | |
| RUN cat /home/developer/.ssh/id_rsa | |
| RUN git --version | |
| RUN cd /tmp && \ | |
| git clone git@bitbucket.org:umovme/umovme-center-functional && \ | |
| cd umovme-center-functional; ls -lah | |
| CMD /usr/bin/google-chrome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment