-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed: Made docker images much smaller.
- Loading branch information
Showing
3 changed files
with
39 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,44 @@ | ||
FROM delner/ruby:2.3.0 | ||
MAINTAINER David Elner <[email protected]> | ||
|
||
RUN apt-get update | ||
# Install dependencies | ||
RUN apt-get update && \ | ||
apt-get install -qq -y nodejs software-properties-common | ||
|
||
# Install nodejs | ||
RUN apt-get install -qq -y nodejs | ||
# Install Nginx. | ||
RUN add-apt-repository -y ppa:nginx/stable && apt-get update && \ | ||
apt-get install -qq -y nginx=1.8.0-1+trusty1 && \ | ||
|
||
# Intall software-properties-common for add-apt-repository | ||
RUN apt-get install -qq -y software-properties-common | ||
# Cleanup | ||
apt-get clean && \ | ||
cd /var/lib/apt/lists && rm -fr *Release* *Sources* *Packages* && \ | ||
truncate -s 0 /var/log/*log | ||
|
||
# Install Nginx. | ||
RUN add-apt-repository -y ppa:nginx/stable && apt-get update | ||
RUN apt-get install -qq -y nginx=1.8.0-1+trusty1 | ||
# Turn off nginx and set owner | ||
RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf | ||
RUN chown -R www-data:www-data /var/lib/nginx | ||
|
||
# Add default nginx config | ||
ADD nginx-sites.conf /etc/nginx/sites-enabled/default | ||
|
||
# Install foreman | ||
RUN gem install foreman | ||
|
||
# Install the latest postgresql lib for pg gem | ||
# Install DB libs | ||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \ | ||
apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive \ | ||
apt-get install -y --force-yes libpq-dev | ||
apt-get install -y --force-yes libpq-dev libmysqlclient-dev && \ | ||
|
||
## Install MySQL(for mysql, mysql2 gem) | ||
RUN apt-get install -qq -y libmysqlclient-dev | ||
# Cleanup | ||
apt-get clean && \ | ||
cd /var/lib/apt/lists && rm -fr *Release* *Sources* *Packages* && \ | ||
truncate -s 0 /var/log/*log | ||
|
||
# Install Rails App | ||
WORKDIR /app | ||
ONBUILD ADD Gemfile /app/Gemfile | ||
ONBUILD ADD Gemfile.lock /app/Gemfile.lock | ||
ONBUILD RUN bundle install | ||
# Defer installation of gems to run time | ||
# So we can take advantage of gem data volume | ||
# ONBUILD ADD Gemfile /app/Gemfile | ||
# ONBUILD ADD Gemfile.lock /app/Gemfile.lock | ||
# ONBUILD RUN bundle install | ||
ONBUILD ADD . /app | ||
|
||
# Add default unicorn config | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
FROM delner/ubuntu-core:14.04.3 | ||
MAINTAINER David Elner <[email protected]> | ||
|
||
RUN apt-get update | ||
|
||
# Install ruby dependencies | ||
RUN apt-get install -y wget curl \ | ||
RUN apt-get update && \ | ||
apt-get install -y wget curl \ | ||
build-essential git git-core \ | ||
zlib1g-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev | ||
zlib1g-dev libssl-dev libreadline-dev libyaml-dev \ | ||
libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev && \ | ||
|
||
# Cleanup | ||
apt-get clean && \ | ||
cd /var/lib/apt/lists && rm -fr *Release* *Sources* *Packages* && \ | ||
truncate -s 0 /var/log/*log | ||
|
||
RUN apt-get update | ||
|
||
# Install Ruby 2.3 | ||
RUN cd /tmp &&\ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
FROM ubuntu:14.04.3 | ||
MAINTAINER David Elner <[email protected]> | ||
|
||
RUN apt-get update | ||
|
||
# Install core utilities | ||
RUN apt-get install -y vim screen lsof tcpdump iptraf | ||
RUN apt-get update -q && \ | ||
apt-get install -qy vim screen lsof tcpdump iptraf --no-install-recommends &&\ | ||
|
||
# Then cleanup | ||
apt-get clean && \ | ||
cd /var/lib/apt/lists && rm -fr *Release* *Sources* *Packages* && \ | ||
truncate -s 0 /var/log/*log |