Skip to content

Commit 7ac48dc

Browse files
feat: add PyPy installation for Alpine on x86_64
Install Alpine-compatible PyPy3.11 build on amd64 platforms to enable faster Python reachability analysis.
1 parent d0886a5 commit 7ac48dc

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2.2.58
4+
5+
- Included PyPy in the Docker image.
6+
37
## 2.2.57
48

59
- Fixed Dockerfile to set `GOROOT` to `/usr/lib/go` when using system Go (`GO_VERSION=system`) instead of always using `/usr/local/go`.

Dockerfile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,22 @@ RUN if [ "$DOTNET_VERSION" = "6" ]; then \
5858
echo "Unsupported .NET version: $DOTNET_VERSION. Supported: 6, 8" && exit 1; \
5959
fi
6060

61+
# Install PyPy (Alpine-compatible build for x86_64 only)
62+
# PyPy is an alternative Python interpreter that makes the Python reachability analysis faster.
63+
# This is a custom build of PyPy3.11 for Alpine on x86-64.
64+
ARG TARGETARCH # Passed by Docker buildx
65+
RUN if [ "$TARGETARCH" = "amd64" ]; then \
66+
PYPY_URL="https://github.com/BarrensZeppelin/alpine-pypy/releases/download/alp3.23.1-pypy3.11-7.3.20/pypy3.11-v7.3.20-linux64-alpine3.21.tar.bz2" && \
67+
PYPY_SHA256="60847fea6ffe96f10a3cd4b703686e944bb4fbcc01b7200c044088dd228425e1" && \
68+
curl -L -o /tmp/pypy.tar.bz2 "$PYPY_URL" && \
69+
echo "$PYPY_SHA256 /tmp/pypy.tar.bz2" | sha256sum -c - && \
70+
mkdir -p /opt/pypy && \
71+
tar -xj --strip-components=1 -C /opt/pypy -f /tmp/pypy.tar.bz2 && \
72+
rm /tmp/pypy.tar.bz2 && \
73+
ln -s /opt/pypy/bin/pypy3 /bin/pypy3 && \
74+
pypy3 --version; \
75+
fi
76+
6177
# Install additional tools
6278
RUN npm install @coana-tech/cli socket -g && \
6379
gem install bundler && \
@@ -104,4 +120,4 @@ RUN mkdir -p /go/src && chmod -R 777 /go
104120
COPY scripts/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
105121
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
106122

107-
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
123+
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]

0 commit comments

Comments
 (0)