pivotal-sg/spotlight

View on GitHub
Dockerfile.rails-base

Summary

Maintainability
Test Coverage
FROM ubuntu:16.04

USER root

RUN echo "LANG=en_US.UTF-8" > /etc/default/locale
RUN apt-get update && \
    apt-get install -y locales && \
    rm -rf /var/lib/apt/lists/* && \
    localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf-8

# Basic and selenium
RUN apt-get update -qqy && \
    apt-get -qqy --no-install-recommends install \
        ca-certificates \
        openjdk-8-jre-headless \
        xvfb \
        curl \
        git \
        firefox && \
    apt-get clean

ENV SCREEN_WIDTH 1360
ENV SCREEN_HEIGHT 1020
ENV SCREEN_DEPTH 24
ENV DISPLAY :99.0

# Setup Postgres
RUN apt-get update && \
    apt-get -y install postgresql && \
    apt-get clean && \
    sed -i'' "s/md5/trust/" /etc/postgresql/9.5/main/pg_hba.conf && \
    /etc/init.d/postgresql start && \
    su -c "createuser root --superuser" postgres \
    sudo systemctl enable postgresql

# Setup ruby 2.3
RUN apt-get install -y software-properties-common && \
    apt-get update && \
    apt-get install -y ruby ruby2.3 ruby2.3-dev bundler && \
    apt-get clean && \

# Install node 5.x
RUN curl -sL https://deb.nodesource.com/setup_5.x | bash - && \
    apt-get install -y nodejs && \
    apt-get clean

# Essentials for installing ruby/node dependencies
RUN apt-get install -y \
    build-essential \
    libpq-dev \
    libsqlite3-dev \
    qt5-default \
    libqt5webkit5-dev \
    gstreamer1.0-plugins-base \
    gstreamer1.0-tools \
    gstreamer1.0-x \
    python \
    && apt-get clean

RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*