0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

redash5.0.1からOracleに接続できるDockerコンテナを作る

Last updated at Posted at 2019-08-31

このページの通りにやってみました

pip自体のアップデート処理を追加する

  • Dockerfileに次の1行を追加します
RUN pip install --upgrade pip

requiments.txt中の OAuthLibのバージョンを上げる

Flask-OAuthLib==0.9.3
Flask-OAuthLib==0.9.5

instant-clientのバージョンを合わせる

18_3
18_5

実際のDockerfileは下記のようになりました

FROM redash/base:latest

RUN apt-get update  -y
RUN apt-get install -y unzip
RUN apt-get install -y libaio-dev  # depends on Oracle
RUN apt-get clean -y

# -- Start setup Oracle
# Add instantclient
ADD oracle/instantclient-basic-linux.x64-18.5.0.0.0dbru.zip /tmp/instantclient-basic-linux.x64-18.5.0.0.0dbru.zip
ADD oracle/instantclient-sdk-linux.x64-18.5.0.0.0dbru.zip /tmp/instantclient-sdk-linux.x64-18.5.0.0.0dbru.zip
ADD oracle/instantclient-sqlplus-linux.x64-18.5.0.0.0dbru.zip /tmp/instantclient-sqlplus-linux.x64-18.5.0.0.0dbru.zip
ADD oracle/instantclient-odbc-linux.x64-18.5.0.0.0dbru.zip /tmp/instantclient-odbc-linux.x64-18.5.0.0.0dbru.zip
ADD oracle/instantclient-jdbc-linux.x64-18.5.0.0.0dbru.zip /tmp/instantclient-jdbc-linux.x64-18.5.0.0.0dbru.zip

RUN mkdir -p /opt/oracle/
RUN unzip /tmp/instantclient-basic-linux.x64-18.5.0.0.0dbru.zip -d /opt/oracle/
RUN unzip /tmp/instantclient-sdk-linux.x64-18.5.0.0.0dbru.zip -d /opt/oracle/
RUN unzip /tmp/instantclient-sqlplus-linux.x64-18.5.0.0.0dbru.zip -d /opt/oracle/
RUN unzip /tmp/instantclient-odbc-linux.x64-18.5.0.0.0dbru.zip -d /opt/oracle/
RUN unzip /tmp/instantclient-jdbc-linux.x64-18.5.0.0.0dbru.zip -d /opt/oracle/

ENV ORACLE_HOME=/opt/oracle/instantclient_18_5
ENV LD_LIBRARY_PATH=/opt/oracle/instantclient_18_5:$LD_LIBRARY_PATH
ENV PATH=/opt/oracle/instantclient_18_5:$PATH

# Add REDASH ENV to add Oracle Query Runner
ENV REDASH_ADDITIONAL_QUERY_RUNNERS=redash.query_runner.oracle
# -- End setup Oracle

# We first copy only the requirements file, to avoid rebuilding on every file
# change.
COPY requirements.txt requirements_dev.txt requirements_all_ds.txt requirements_oracle_ds.txt ./
RUN pip install --upgrade pip
RUN pip install -r requirements.txt -r requirements_dev.txt -r requirements_all_ds.txt -r requirements_oracle_ds.txt

COPY . ./
RUN npm install && npm run build && rm -rf node_modules
RUN chown -R redash /app
USER redash

ENTRYPOINT ["/app/bin/docker-entrypoint"]
CMD ["server"]

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?