Last active
January 29, 2019 20:13
-
-
Save oisin/541161a03f5281991f49 to your computer and use it in GitHub Desktop.
Dockerfile snippet for Ruby API Server setup experiment
This file contains 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 | |
MAINTAINER Oisin Hurley <oisin@nis.io> | |
RUN apt-get update && apt-get install -y curl wget git | |
RUN adduser --home /home/api_server --disabled-password --gecos '' api_server | |
RUN adduser api_server sudo | |
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | |
USER api_server | |
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 | |
RUN curl -sSL https://get.rvm.io | bash -s stable | |
RUN /bin/bash -l -c "source /home/api_server/.rvm/scripts/rvm" | |
RUN /bin/bash -l -c "rvm install 2.1.4" | |
RUN /bin/bash -l -c "gem install bundler" | |
RUN /bin/bash -l -c "gem install foreman" | |
RUN /bin/bash -l -c "git clone https://github.com/oisin/echo.git /home/api_server/echo" | |
RUN /bin/bash -l -c "bundle install --gemfile=/home/api_server/echo/Gemfile" | |
WORKDIR /home/api_server/echo | |
EXPOSE 5000 | |
CMD ["/bin/bash", "-c", "-l", "foreman start -d /home/api_server/echo -f /home/api_server/echo/Procfile"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment