Public Repository

Last pushed: 5 months ago
Short Description
Test docker image to show a hostname in ruby
Full Description

<Dockerfile>
FROM ruby:2.3
MAINTAINER subicura@subicura.com
COPY Gemfile* /usr/src/app/
WORKDIR /usr/src/app
RUN bundle install
COPY . /usr/src/app
EXPOSE 4567
CMD bundle exec ruby app.rb -o 0.0.0.0

<Gemfile>
source 'https://rubygems.org'
gem 'sinatra'

<app.rb>
require 'sinatra'
require 'socket'
get '/' do
Socket.gethostname
end

Docker Pull Command
Owner
anadk

Comments (0)