File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11ARG BASE_IMAGE="python:3.12-slim-bookworm@sha256:31a416db24bd8ade7dac5fd5999ba6c234d7fa79d4add8781e95f41b187f4c9a"
22FROM ${BASE_IMAGE} AS compile-image
33
4+ ARG DOCKER_VERSION="28.1.1"
5+
46RUN apt-get update --fix-missing && \
57 apt-get upgrade -y && \
6- apt-get install -y gcc
8+ apt-get install -y gcc curl bzip2 unzip
9+
10+ # Get docker binary
11+ ADD https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz /
12+ RUN tar --extract --file docker-${DOCKER_VERSION}.tgz --directory /tmp/ --strip-components 1
713
814WORKDIR /opt/seatable-python-starter
915COPY ["./requirements.txt" , "/opt/seatable-python-starter/" ]
1016
1117# Upgrade setuptools to fix vulnerabilities
1218RUN pip install --upgrade setuptools && \
1319 pip install --upgrade --user setuptools && \
14- pip install -r /opt/seatable-python-starter/requirements.txt --user --break-system-packages
20+ pip install -r /opt/seatable-python-starter/requirements.txt --user
1521
1622# ## Runtime image
1723FROM ${BASE_IMAGE} AS runtime-image
@@ -23,13 +29,13 @@ RUN apt-get update --fix-missing && \
2329 tzdata \
2430 procps \
2531 cron \
26- logrotate \
27- docker.io \
28- gcc \
29- curl && \
32+ logrotate && \
3033 apt-get autoremove -y && \
3134 apt-get clean
3235
36+ COPY --from=build-image /tmp/docker /usr/local/bin/docker
37+ RUN chmod +x /usr/local/bin/docker
38+
3339WORKDIR /opt/seatable-python-starter
3440COPY ["./" , "./" ]
3541
Original file line number Diff line number Diff line change 6969echo " ** uWSGI is starting now"
7070uwsgi --ini /opt/seatable-python-starter/uwsgi.ini 2>&1 &
7171sleep 1
72- if curl -IsSf http://127.0.0.1:8080/ping/ > /dev/null 2>&1 ; then
72+ if echo -e " HEAD /ping/ HTTP/1.1\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n" | \
73+ timeout 2 bash -c ' cat < /dev/tcp/127.0.0.1/8080' > /dev/null 2>&1 ; then
7374 echo " ** SeaTable Python Starter ready"
7475else
7576 echo " ** Error: SeaTable Python Starter is not ready. uWSGI is not answering."
You can’t perform that action at this time.
0 commit comments