Last active
May 29, 2018 02:16
-
-
Save juanhuttemann/ac3355da78c80139f69cbfa43ed23fc3 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 ruby:2.3.3 | |
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
RUN mkdir /myapp | |
WORKDIR /myapp | |
COPY Gemfile /myapp/Gemfile | |
COPY Gemfile.lock /myapp/Gemfile.lock | |
RUN bundle install | |
EXPOSE 3000 | |
VOLUME /myapp | |
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"] |
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
docker build -t image_name . | |
docker run -p 3000:3000 -d -v ~/my_app1:/myapp --name container_name image_name | |
docker exec -it container_name bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment