-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (26 loc) · 919 Bytes
/
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
ARG VERSION=3.11.0
ARG ARTIFACT=python
ARG HOST="docker.io"
FROM --platform=linux/amd64 $HOST/$ARTIFACT:$VERSION
ADD instantclient-basiclite-linux.x64-19.12.0.0.0dbru.zip /opt
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get dist-upgrade -y && \
apt-get -y autoremove && \
apt-get clean
RUN apt-get install -y --no-install-recommends \
unzip \
libaio1 \
;
WORKDIR /opt
RUN unzip /opt/instantclient-basiclite-linux.x64-19.12.0.0.0dbru.zip \
&& sh -c "echo /opt/instantclient_19_12 > \
/etc/ld.so.conf.d/oracle-instantclient.conf" \
&& rm -f /opt/instantclient-basiclite-linux.x64-19.12.0.0.0dbru.zip
RUN rm -f /etc/localtime \
&& ln -sv /usr/share/zoneinfo/Hongkong /etc/localtime \
&& echo "Hongkong" > /etc/timezone
ENV LD_LIBRARY_PATH=/opt/instantclient_19_12:$LD_LIBRARY_PATH
ENV PATH==/opt/instantclient_19_12:$PATH
RUN pip install cx_Oracle
CMD ["python"]