Sha256: 9d97693555af93b83e5255d4b0b41950361b1d07b64d98040b6a5f037acf6566

Contents?: true

Size: 1.26 KB

Versions: 1

Compression:

Stored size: 1.26 KB

Contents

FROM opensuse/leap:15.1

ENV NOKOGIRI_USE_SYSTEM_LIBRARIES 1
RUN useradd -g users -p rails -d /home/rails -m rails
RUN echo 'rails ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers

RUN zypper -n addrepo -f https://dl.yarnpkg.com/rpm/yarn.repo; zypper --gpg-auto-import-keys refresh
RUN zypper -n install --no-recommends ruby2.5-devel nodejs10 make gcc timezone sudo pkg-config sqlite3-devel libxml2-devel libxslt-devel yarn git-core curl
RUN zypper -n clean -a
RUN gem install --no-format-executable --no-document rails -v '~> 6'

USER rails
WORKDIR /home/rails

RUN rails new thingiverse;

WORKDIR /home/rails/thingiverse
RUN rails g scaffold thing name:string amount:integer
RUN echo 'gem "influxdb-rails", :git => "https://github.com/influxdata/influxdb-rails/", :branch => "master"' >> Gemfile
RUN bundle install; rails webpacker:install; rake db:migrate
RUN sed -i '2i \  root to: "things#index"' config/routes.rb
RUN bundle exec rails generate influxdb
RUN curl -o app/controllers/application_controller.rb https://gist.githubusercontent.com/hennevogel/296e93b9db620e9cf48eeb30cef6a145/raw/8c6d4635ded3bef2ca9cfdf65c5863cf6f03a984/application_controller.rb
RUN sed -i '2i \  config.client.hosts = "influx"' config/initializers/influxdb_rails.rb
CMD bundle exec rails server -b 0.0.0.0 -p 4000

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
influxdb-rails-1.0.0.beta4 sample-dashboard/Dockerfile