Skip to content
This repository was archived by the owner on Dec 29, 2023. It is now read-only.

Commit d9d48f2

Browse files
authored
Shrink container size
shrink from 880MB to 550MB
1 parent b3f0de6 commit d9d48f2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Dockerfile

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
FROM ubuntu:20.04
1+
FROM python:3.8.10-slim
22
ENV VERSION 0.6.0
3-
RUN apt update && apt install -y python3-minimal python3-pip && rm -rf /var/lib/apt/lists/*
4-
RUN pip install chdb Flask && strip /usr/local/lib/python3.8/dist-packages/chdb/_chdb*.so && rm -rf ~/.cache/pip/*
3+
RUN apt update && apt install -y binutils \
4+
&& pip install chdb Flask \
5+
&& strip /usr/local/lib/python3.8/site-packages/chdb/_chdb.cpython-38-x86_64-linux-gnu.so \
6+
&& rm -rf /var/lib/apt/lists/* && rm -rf ~/.cache/pip/*
57
WORKDIR /app
68
ADD main.py .
79
ADD public ./public
8-
RUN python3 -c "import chdb; res = chdb.query('select version()', 'CSV'); print(str(res.get_memview().tobytes()))"
10+
# RUN python3 -c "import chdb; res = chdb.query('select version()', 'CSV'); print(str(res.get_memview().tobytes()))"
911
EXPOSE 8123
1012
CMD ["python3","./main.py"]

0 commit comments

Comments
 (0)