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>
|
|
|
|
|
|
|
|
COPY . /opt/redash/current/
|
|
|
|
|
|
|
|
WORKDIR /opt/redash/current
|
|
|
|
|
2015-10-06 20:21:09 +00:00
|
|
|
ENV FILES_BASE_URL /opt/redash/current/setup/files/
|
|
|
|
|
2015-10-07 17:58:52 +00:00
|
|
|
# Ubuntu packages
|
2015-10-06 21:13:53 +00:00
|
|
|
RUN apt-get update && \
|
2015-10-07 17:58:52 +00:00
|
|
|
apt-get install -y python-pip python-dev curl build-essential pwgen libffi-dev sudo git-core && \
|
|
|
|
# Postgres client
|
|
|
|
apt-get -y install libpq-dev postgresql-client && \
|
|
|
|
# Additional packages required for data sources:
|
|
|
|
apt-get install -y libssl-dev libmysqlclient-dev
|
|
|
|
|
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
|
2015-10-06 21:12:48 +00:00
|
|
|
RUN useradd --system --comment " " --create-home postgres
|
2015-10-06 20:21:09 +00:00
|
|
|
|
2015-10-07 18:07:33 +00:00
|
|
|
# Folders creation
|
|
|
|
RUN mkdir /opt/redash/logs && \
|
|
|
|
mkdir -p /opt/redash/supervisord
|
2015-10-06 20:21:09 +00:00
|
|
|
|
|
|
|
# Pip requirements for all data source types
|
2015-10-07 18:07:33 +00:00
|
|
|
RUN pip install -U setuptools && \
|
|
|
|
pip install -r requirements_all_ds.txt && \
|
|
|
|
pip install -r requirements.txt && \
|
|
|
|
pip install supervisor==3.1.2
|
2015-10-06 20:21:09 +00:00
|
|
|
|
|
|
|
# Get supervisord startup script
|
|
|
|
RUN cp $FILES_BASE_URL"supervisord_docker.conf" /opt/redash/supervisord/supervisord.conf
|
|
|
|
|
|
|
|
RUN cp $FILES_BASE_URL"redash_supervisord_init" /etc/init.d/redash_supervisord
|
|
|
|
|
|
|
|
# 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-06 20:21:09 +00:00
|
|
|
CMD bash /etc/init.d/redash_supervisord start
|