Skip to content

Commit 29a01b0

Browse files
committed
build thumbor in build container
1 parent b6ea506 commit 29a01b0

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

docker/Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@ RUN apt-get update && \
1919
gcc \
2020
libcairo2-dev \
2121
build-essential && \
22-
apt-get clean && rm -rf /var/lib/apt/lists/*
22+
apt-get clean && rm -rf /var/lib/apt/lists/* && \
23+
pip3 install --no-cache-dir wheel setuptools
2324

24-
RUN mkdir /tmp/thumbor_dist
25-
COPY dist/* /tmp/thumbor_dist
25+
ADD . /src
26+
WORKDIR /src
27+
RUN python3 setup.py sdist && \
28+
mv dist/ /tmp/thumbor_dist
2629

2730
RUN python3 -m venv /home/thumbor/venv
2831
ENV PATH="/home/thumbor/venv/bin:$PATH"
2932

30-
RUN pip3 install --no-cache-dir wheel && \
31-
pip3 install --no-cache-dir --find-links=/tmp/thumbor_dist thumbor[all]==${THUMBOR_VERSION}
33+
RUN pip3 install --no-cache-dir --find-links=/tmp/thumbor_dist thumbor[all]==${THUMBOR_VERSION}
3234

3335
FROM python:${PYTHON_VERSION}-slim-bullseye AS runner-image
3436

0 commit comments

Comments
 (0)