2015-10-06 18:42:19 +00:00
|
|
|
FROM ubuntu:trusty
|
2015-09-30 21:19:22 +00:00
|
|
|
MAINTAINER Di Wu <diwu@yelp.com>
|
|
|
|
|
2015-10-07 17:58:52 +00:00
|
|
|
# Ubuntu packages
|
2015-10-06 21:13:53 +00:00
|
|
|
RUN apt-get update && \
|
2015-10-18 13:54:40 +00:00
|
|
|
apt-get install -y python-pip python-dev curl build-essential pwgen libffi-dev sudo git-core wget \
|
2015-10-07 17:58:52 +00:00
|
|
|
# Postgres client
|
2015-10-18 13:54:40 +00:00
|
|
|
libpq-dev \
|
2015-10-07 17:58:52 +00:00
|
|
|
# Additional packages required for data sources:
|
2015-10-18 13:54:40 +00:00
|
|
|
libssl-dev libmysqlclient-dev
|
2015-10-07 17:58:52 +00:00
|
|
|
|
2015-10-07 18:07:33 +00:00
|
|
|
# Users creation
|
2015-10-06 20:21:09 +00:00
|
|
|
RUN useradd --system --comment " " --create-home redash
|
|
|
|
|
|
|
|
# Pip requirements for all data source types
|
2015-10-07 18:07:33 +00:00
|
|
|
RUN pip install -U setuptools && \
|
|
|
|
pip install supervisor==3.1.2
|
2015-10-06 20:21:09 +00:00
|
|
|
|
2015-10-08 19:14:07 +00:00
|
|
|
COPY . /opt/redash/current
|
2015-10-08 19:09:24 +00:00
|
|
|
|
|
|
|
# Setting working directory
|
|
|
|
WORKDIR /opt/redash/current
|
|
|
|
|
|
|
|
# Install project specific dependencies
|
|
|
|
RUN pip install -r requirements_all_ds.txt && \
|
|
|
|
pip install -r requirements.txt
|
|
|
|
|
2015-10-07 18:16:49 +00:00
|
|
|
# Setup supervisord
|
|
|
|
RUN mkdir -p /opt/redash/supervisord && \
|
|
|
|
mkdir -p /opt/redash/logs && \
|
2015-10-18 13:54:40 +00:00
|
|
|
cp /opt/redash/current/setup/docker/supervisord/supervisord.conf /opt/redash/supervisord/supervisord.conf
|
2015-10-06 20:21:09 +00:00
|
|
|
|
|
|
|
# Fix permissions
|
|
|
|
RUN chown -R redash /opt/redash
|
|
|
|
|
2015-10-06 23:30:18 +00:00
|
|
|
# Expose ports
|
|
|
|
EXPOSE 5000
|
|
|
|
EXPOSE 9001
|
|
|
|
|
|
|
|
# Startup script
|
2015-10-07 23:21:37 +00:00
|
|
|
CMD ["supervisord", "-c", "/opt/redash/supervisord/supervisord.conf"]
|