-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (39 loc) · 1.75 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Use the latest Ubuntu image as the base
FROM ubuntu:latest
COPY . .
# Install dependencies
RUN apt-get update -y
RUN apt-get install -y git
RUN apt-get install -y python3-pip
RUN apt-get install -y python3
RUN apt-get install -y nodejs
RUN apt-get install -y vim
RUN apt-get install -y curl
RUN apt-get install -y iputils-ping
RUN apt-get install -y postgresql-client
RUN apt-get install -y wget
RUN apt-get install -y libaio1t64
RUN apt-get install -y unzip
RUN rm -rf /var/lib/apt/lists/*
# Set environment variables for Oracle Instant Client
ENV ORACLE_HOME=/opt/oracle
ENV LD_LIBRARY_PATH=$ORACLE_HOME
# Define the Oracle Instant Client download URLs
ENV BASIC_ZIP_URL="https://download.oracle.com/otn_software/linux/instantclient/2350000/instantclient-basic-linux.x64-23.5.0.24.07.zip"
ENV SQLPLUS_ZIP_URL="https://download.oracle.com/otn_software/linux/instantclient/2350000/instantclient-sqlplus-linux.x64-23.5.0.24.07.zip"
# Download Oracle Instant Client files
RUN wget --no-check-certificate "${BASIC_ZIP_URL}" -O /tmp/instantclient-basic.zip && \
wget --no-check-certificate "${SQLPLUS_ZIP_URL}" -O /tmp/instantclient-sqlplus.zip
# Unzip and set up Oracle Instant Client
RUN mkdir -p ${ORACLE_HOME}
RUN unzip "/tmp/instantclient-basic.zip" -d /tmp/oracle_basic
RUN unzip "/tmp/instantclient-sqlplus.zip" -d /tmp/oracle_sqlplus
RUN mv /tmp/oracle_basic/instantclient_*/* ${ORACLE_HOME}/
RUN mv /tmp/oracle_sqlplus/instantclient_*/* ${ORACLE_HOME}/
RUN rm -rf /tmp
RUN ln -s ${ORACLE_HOME}/instantclient ${ORACLE_HOME}/instantclient
RUN ln -s ${ORACLE_HOME}/sqlplus /usr/bin/sqlplus
RUN ln -s /usr/lib/*-linux-gnu/libaio.so.1t64 ${ORACLE_HOME}/libaio.so.1
RUN pip install -r requirements.txt --break-system-packages
EXPOSE 8080
ENTRYPOINT ["python3", "./status.py"]