Skip to content

Instantly share code, notes, and snippets.

@MC-Squared
Created September 13, 2019 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MC-Squared/9178e82d620955e3f8ba977f94ee6fa0 to your computer and use it in GitHub Desktop.
Save MC-Squared/9178e82d620955e3f8ba977f94ee6fa0 to your computer and use it in GitHub Desktop.
Balena.io Ruby on Rails Dockerfile
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