August 2019
Beginner
608 pages
16h 7m
English
The main idea is that, in the build phase, you prepare your code to run in a packaged way – in a Docker container that you built using a Dockerfile – via Heroku build packs.
For the eventmanager app, user1 created the following Dockerfile:
FROM ruby:2 COPY . /var/www/ruby WORKDIR /var/www/ruby RUN bundle install CMD ["ruby","eventmanager.rb"] EXPOSE 5000/tcp
As you can see from the first line of the preceding code, it pulls a basic Ruby-enabled Debian Linux image. It copies all the source code to a directory and goes there. Then, a bundle install is run, which installs all the Ruby dependencies that are needed. Finally, it starts the eventmanager app using the CMD command and exposes port 5000 to the outside world. It has to expose ...
Read now
Unlock full access