Skip to content

Commit

Permalink
fix #33 missing libpcre3
Browse files Browse the repository at this point in the history
  • Loading branch information
sebo-b committed Feb 17, 2024
1 parent b6b93a3 commit 9e75c9f
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@ FROM python:3-slim AS compile-image
ENV NODE_VER=16.3.0

WORKDIR /opt/warp
RUN apt-get update
RUN mkdir debs && \
apt-get install -y -d --no-install-recommends libpq5 mime-support && \
cp /var/cache/apt/archives/*deb debs
RUN apt-get update && \
apt-get install -y --no-install-recommends wget mime-support build-essential libpq-dev libpcre3-dev

RUN \
apt-get install -y wget && \
NODE_ARCH=$(uname -m | sed 's/^x86_64\|amd64$/x64/;s/^i.*86$/x86/;s/^aarch64$/arm64/') && \
RUN NODE_ARCH=$(uname -m | sed 's/^x86_64\|amd64$/x64/;s/^i.*86$/x86/;s/^aarch64$/arm64/') && \
NODE_URL="https://nodejs.org/dist/v${NODE_VER}/node-v${NODE_VER}-linux-${NODE_ARCH}.tar.gz" && \
wget -O - "$NODE_URL" | tar -xz --strip-components=1 -C /usr/

RUN apt-get install -y build-essential libpq-dev libpcre3 libpcre3-dev
RUN pip install --upgrade setuptools && pip install wheel uwsgi
RUN pip wheel -w wheel/ uwsgi

Expand All @@ -40,11 +35,9 @@ RUN python setup.py bdist_wheel -d wheel
FROM python:3-slim
WORKDIR /opt/warp

RUN \
--mount=type=bind,from=compile-image,source=/opt/warp/debs,target=./debs \
dpkg -i debs/*.deb
#COPY --from=compile-image /opt/warp/debs ./debs
#RUN dpkg -i debs/*.deb
RUN apt-get update && \
apt-get install -y --no-install-recommends libpq5 mime-support libpcre3 && \
rm -rf /var/lib/apt/lists/*

RUN \
--mount=type=bind,from=compile-image,source=/opt/warp/wheel,target=./wheel \
Expand Down

0 comments on commit 9e75c9f

Please sign in to comment.