Created
September 13, 2019 10:06
-
-
Save MC-Squared/9178e82d620955e3f8ba977f94ee6fa0 to your computer and use it in GitHub Desktop.
Balena.io Ruby on Rails Dockerfile
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 balenalib/raspberry-pi-node:10-buster-build | |
RUN mkdir -p /tmp/ruby \ | |
&& curl -SLO "https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.4.tar.gz" \ | |
&& echo "4fc1d8ba75505b3797020a6ffc85a8bcff6adc4dabae343b6572bf281ee17937 ruby-2.6.4.tar.gz" | sha256sum -c - \ | |
&& tar -xzf "ruby-2.6.4.tar.gz" -C /tmp/ruby --strip-components=1 \ | |
&& rm -f ruby-2.6.4.tar.gz | |
WORKDIR /tmp/ruby | |
RUN ./configure \ | |
&& make \ | |
&& make install | |
WORKDIR /tmp | |
RUN rm -r /tmp/ruby | |
RUN gem install bundler | |
WORKDIR /app | |
COPY /testapp ./ | |
RUN bundle install | |
RUN yarn install | |
ENV RAILS_MAX_THREADS 1 | |
ENV PORT 80 | |
CMD bundle exec rails s -b 0.0.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment