Last active
January 20, 2017 11:29
-
-
Save mrbungie/585d8ed1389b624efbf691dc134c366c to your computer and use it in GitHub Desktop.
Dockerfile - Redash with teradata support
This file contains hidden or 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
FROM ubuntu:trusty | |
# Ubuntu packages | |
RUN apt-get update && \ | |
apt-get install -y python-pip python-dev curl build-essential pwgen libffi-dev sudo git-core wget \ | |
# Postgres client | |
libpq-dev \ | |
# Additional packages required for data sources: | |
libssl-dev libmysqlclient-dev freetds-dev libsasl2-dev && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* | |
# Users creation | |
RUN useradd --system --comment " " --create-home redash | |
# Pip requirements for all data source types | |
RUN pip install -U setuptools==23.1.0 && \ | |
pip install supervisor==3.1.2 | |
COPY . /opt/redash/current | |
RUN chown -R redash /opt/redash/current | |
# Setting working directory | |
WORKDIR /opt/redash/current | |
# Install project specific dependencies | |
RUN pip install -r requirements_all_ds.txt && \ | |
pip install -r requirements.txt | |
RUN curl https://deb.nodesource.com/setup_4.x | bash - && \ | |
apt-get install -y nodejs && \ | |
sudo -u redash -H make deps && \ | |
rm -rf node_modules client/node_modules /home/redash/.npm /home/redash/.cache && \ | |
apt-get purge -y nodejs && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* | |
# Setup supervisord | |
RUN mkdir -p /opt/redash/supervisord && \ | |
mkdir -p /opt/redash/logs && \ | |
cp /opt/redash/current/setup/docker/supervisord/supervisord.conf /opt/redash/supervisord/supervisord.conf | |
# Fix permissions | |
RUN chown -R redash /opt/redash | |
# Expose ports | |
EXPOSE 5000 | |
EXPOSE 9001 | |
# Teradata specific | |
RUN mkdir /root/teradata | |
WORKDIR /root/teradata | |
COPY tdodbc__linux_imdep.14.10.00.00-1.tar . | |
RUN tar xvf tdodbc__linux_imdep.14.10.00.00-1.tar && \ | |
apt-get install -y alien && \ | |
alien tdodbc-14.10.00.00-1.noarch.rpm && \ | |
alien tdicu-14.10.00.00-1.noarch.rpm && \ | |
alien TeraGSS_linux_x64-14.10.00.06-1.noarch.rpm && \ | |
dpkg -i tdodbc_14.10.00.00-2_all.deb && \ | |
dpkg -i tdicu_14.10.00.00-2_all.deb && \ | |
dpkg -i teragss-linux-x64_14.10.00.06-2_all.deb && \ | |
apt-get purge -y alien && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* | |
ENV NLSPATH /opt/teradata/client/14.10/odbc_64/msg/tdodbc.cat | |
ENV LD_LIBRARY_PATH /opt/teradata/client/14.10/odbc_64/lib:$LD_LIBRARY_PATH | |
ENV ODBCINI /opt/teradata/client/14.10/odbc_64/odbc.ini | |
ENV ODBCINST /opt/teradata/client/14.10/odbc_64/odbcinst.ini | |
# back to working directory | |
WORKDIR /opt/redash/current | |
RUN rm -rf /root/teradata | |
# Startup script | |
CMD ["supervisord", "-c", "/opt/redash/supervisord/supervisord.conf"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment