Browse Source

migrate source Docker image to a debian based one, fixup dockerfile

master
Thomas Riboulet 5 years ago
parent
commit
9b8c64b870
  1. 9
      Dockerfile
  2. 2
      hello.rb
  3. 2
      worker.rb

9
Dockerfile

@ -1,12 +1,13 @@
FROM mcansky/base_ruby:2c7652fa95a2ab9419bb85e81a7c801ca6fa65d2
FROM ruby:2.3.5-slim
RUN apt-get update && apt-get install -y build-essential libffi-dev libgdbm-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev zlib1g-dev curl libyaml-0-2 libxml2-dev libxslt-dev
#RUN apk --update add --virtual openssl-dev build-dependencies ruby-dev build-base
# Set environment variables.
ENV HOME /var/app
ENV RACK_ENV production
# Define working directory.
ADD . /var/app
RUN cd /var/app; bundle install
RUN cd /var/app; bundle install --without development test
CMD ["./var/app/bin/http"]

2
hello.rb

@ -4,7 +4,7 @@ require 'redis'
require 'sidekiq/api'
require 'haml'
$redis = Redis.new
$redis = Redis.new(url: ENV['REDIS_URL'])
class SimpleApp < Sinatra::Base

2
worker.rb

@ -3,7 +3,7 @@ require 'sidekiq'
require 'redis'
require 'sidekiq/api'
$redis = Redis.new
$redis = Redis.new(url: ENV['REDIS_URL'])
class SinatraWorker
include Sidekiq::Worker

Loading…
Cancel
Save