-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
28 lines (21 loc) · 827 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
ARG PYTHON_VERSION=3.10
ARG OS_VARIANT=bullseye-slim
FROM python:${PYTHON_VERSION}-${OS_VARIANT}
ARG PYTHON_VERSION
ENV PYTHON_VERSION=${PYTHON_VERSION}
ARG OS_VARIANT
ENV OS_VARIANT=${OS_VARIANT}
# This is required should be supplied as a build-arg
ARG WHEEL_TO_INSTALL
RUN test -n "${WHEEL_TO_INSTALL}" || (echo "Must supply WHEEL_TO_INSTALL as build arg"; exit 1)
COPY dist/${WHEEL_TO_INSTALL} dist/${WHEEL_TO_INSTALL}
# NodeJS needs libstdc++ to be present
# https://github.com/nodejs/unofficial-builds/#builds
RUN if echo "${OS_VARIANT}" | grep -e "alpine"; then \
apk add libstdc++; \
fi
RUN pip install dist/${WHEEL_TO_INSTALL}
RUN python -W error -m nodejs --version
RUN python -W error -m nodejs.npm --version
RUN python -W error -m nodejs.npx --version
RUN python -W error -m nodejs.corepack --version