Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
don't switch users
  • Loading branch information
guykisel committed Jul 21, 2017
commit e78f634b126a1d7e4df711ffce8f933b4f844bd1
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,15 @@ RUN eval "$(pyenv virtualenv-init -)"
RUN pyenv update
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want the pyenv steps lower down in the dockerfile than the known hosts steps, since they're more likely to change. E.g. when you want to switch to a new python version.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably. the pyenv stuff isn't even working yet anyway, it still seems to be using the system python.

RUN pyenv install 2.7.13
RUN pyenv install 3.6.0
RUN pyenv global 2.7.13 3.6.0
COPY ./app /app
COPY requirements.txt /app
RUN pip install -r /app/requirements.txt

# Install rvm (https://github.com/vallard/docker/blob/master/rails/Dockerfile)
RUN apt-get install -y curl patch gawk g++ gcc make libc6-dev patch libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev
RUN useradd -ms /bin/bash app
USER app
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
RUN /bin/bash -l -c "curl -L get.rvm.io | bash -s stable --rails"
RUN /bin/bash -l -c "rvm install 2.1"
RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc"
RUN curl -L https://get.rvm.io | bash -s stable
RUN bash -l -c "rvm requirements"
RUN bash -l -c "rvm install 2.0"
RUN bash -l -c "gem install bundler --no-ri --no-rdoc"