Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - docker container with some preserved gems #2

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
FROM ruby:2.3.0
RUN apt-get update -qq && apt-get install -y --force-yes build-essential libpq-dev nodejs sqlite3 libsqlite3-dev


RUN apt-get install -y libc6-dev --force-yes
RUN apt-get install -y libevent-dev --force-yes

RUN apt-key list | grep -A 1 expired
# RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 1668892417

# Make apt non-interactive
RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \
&& echo 'DPkg::Options "--force-confnew";' >> /etc/apt/apt.conf.d/90circleci

ENV DEBIAN_FRONTEND=noninteractive

# Install required packages
RUN set -ex; \
apt-get update; \
mkdir -p /usr/share/man/man1; \
apt-get install -y --force-yes --no-install-recommends \
git mercurial xvfb \
locales sudo openssh-client ca-certificates tar gzip parallel \
net-tools netcat unzip zip bzip2 gnupg curl wget \
tzdata rsync vim; \
rm -rf /var/lib/apt/lists/*;

# Set timezone to UTC by default
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime

# Set language
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en


RUN apt-get update && apt-get install -y \
nodejs \
mysql-client postgresql-client sqlite3 \
imagemagick \
zlib1g-dev \
--no-install-recommends --force-yes && rm -rf /var/lib/apt/lists/*

# Create app directory
RUN mkdir -p /myapp

WORKDIR /myapp

ENV APP_HOME /myapp
# RUN mkdir $APP_HOME
WORKDIR $APP_HOME
COPY . .


RUN gem install bundler:1.17.3
RUN gem install connection_pool -v 1.2.0
RUN gem install json -v=1.8.3
RUN gem install rack -v=1.2
# RUN gem install mimemagic -v=0.1.9
RUN gem install ./vendor/cache/rails-3.2.13.gem
RUN gem install ./vendor/cache/sqlite3-1.4.0.gem
RUN gem install ./vendor/cache/xmpp4r-0.5.gem
RUN gem install ./vendor/cache/net-ssh-2.6.8.gem
# RUN gem install ./vendor/cache/social_stream-2.2.2.gem
# RUN gem install ./vendor/cache/social_stream-base-2.2.2.gem --verbose
# RUN gem install ./vendor/cache/social_stream-documents-2.2.1.gem
# RUN gem install ./vendor/cache/social_stream-events-2.2.1.gem
# RUN gem install ./vendor/cache/social_stream-linkser-2.2.1.gem
# RUN gem install ./vendor/cache/social_stream-oauth2_server-2.2.2.gem
# RUN gem install ./vendor/cache/social_stream-ostatus-2.2.1.gem
# RUN gem install ./vendor/cache/social_stream-presence-2.2.1.gem


# RUN bundle outdated --only-explicit
RUN bundle _1.17.3_ install --verbose

# Default command to run
CMD ["/bin/bash"]

EXPOSE 3000
27 changes: 15 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
source 'https://rubygems.org'


gem 'rack-cache','1.2'
gem 'rails', '3.2.13'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'
gem 'sqlite3','1.4.0'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
# group :assets do
# gem 'sass-rails', '~> 3.2.3'
# gem 'coffee-rails', '~> 3.2.1'

gem 'uglifier', '>= 1.0.3'
end
# # See https://github.com/sstephenson/execjs#readme for more supported runtimes
# # gem 'therubyracer', :platforms => :ruby

gem 'jquery-rails'
# gem 'uglifier', '>= 1.0.3'
# end

# gem 'jquery-rails', '>= 3.0.0' # social_stream-base (~> 2.2.2) was resolved to 2.2.2, which depends on jquery-rails (>= 3.0.0)
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
gem 'bcrypt-ruby', '3.1.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'
Expand All @@ -37,4 +38,6 @@ gem 'jquery-rails'
# To use debugger
# gem 'debugger'

gem 'social_stream', git: 'git://github.com/ging/social_stream.git', branch: 'master'
# gem 'social_stream', git: 'https://github.com/ging/social_stream.git', branch: 'master'
gem "social_stream", path: "./local/social_stream"
gem "activesupport", "3.2.13"
Loading