Skip to content

Commit 7dd8949

Browse files
refactor: Add the dependency files for the dm database
1 parent 2b13dc7 commit 7dd8949

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ ENV POSTGRES_DB=sqlbot
8080
ENV POSTGRES_USER=root
8181
ENV POSTGRES_PASSWORD=Password123@pg
8282

83-
# Add Oracle instant client path to ENV
84-
ENV LD_LIBRARY_PATH="/opt/sqlbot/db_client/oracle_instant_client:${LD_LIBRARY_PATH}"
85-
8683
# Copy necessary files from builder
8784
COPY start.sh /opt/sqlbot/app/start.sh
8885
COPY g2-ssr/*.ttf /usr/share/fonts/truetype/liberation/

Dockerfile-base

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3131

3232
# Download Oracle instant client
3333
ENV DB_CLIENT=/opt/sqlbot/db_client
34+
ENV LD_LIBRARY_PATH="${DB_CLIENT}/oracle_instant_client:${LD_LIBRARY_PATH}"
3435
ARG TARGETARCH
3536
RUN apt-get update && \
3637
apt-get install -y unzip libaio1 && \
@@ -45,4 +46,13 @@ RUN apt-get update && \
4546
unzip app.zip -d ${DB_CLIENT} && \
4647
rm app.zip && \
4748
rm -rf /var/lib/apt/lists/* && \
48-
mv ${DB_CLIENT}/instantclient* ${DB_CLIENT}/oracle_instant_client
49+
mv ${DB_CLIENT}/instantclient* ${DB_CLIENT}/oracle_instant_client
50+
51+
# Download DM library
52+
ENV DM_HOME=/opt/dmdbms
53+
ENV LD_LIBRARY_PATH=$DM_HOME/bin:$LD_LIBRARY_PATH
54+
RUN curl -L -o dm.zip https://resource-fit2cloud-com.oss-cn-hangzhou.aliyuncs.com/sqlbot/dm/$TARGETARCH.zip && \
55+
mkdir -p $DM_HOME/bin && \
56+
unzip dm.zip -d $DM_HOME/bin && \
57+
chmod -R +x $DM_HOME/bin && \
58+
rm -rf dm.zip

0 commit comments

Comments
 (0)