forked from sourcegraph/scip-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (33 loc) · 1.28 KB
/
Dockerfile
File metadata and controls
44 lines (33 loc) · 1.28 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
ARG VERSION_DEBIAN=bookworm
ARG VERSION_NODE=16
ARG VERSION_PYTHON=3.10
ARG VERSION_SCIP_PYTHON=v0.6.0
FROM node:$VERSION_NODE-$VERSION_DEBIAN-slim as technology-node
FROM python:$VERSION_PYTHON-slim-$VERSION_DEBIAN as technology-python
FROM buildpack-deps:$VERSION_DEBIAN as base
COPY --link --from=technology-node /usr/local /usr/local
COPY --link --from=technology-python /usr/local /usr/local
# NOTE: ldconfig is needed for Python to understand where shared libraries are.
RUN ldconfig \
# We remove pre-installed yarn and enable corepack.
&& rm -rf /usr/local/bin/yarn* \
&& corepack enable \
# NOTE: Smoke tests while having as little side effects as possible.
&& node --version \
&& yarn --version \
&& npm --logs-max=0 --version \
&& PYTHONDONTWRITEBYTECODE=1 python3 --version \
&& pip --version
FROM base AS release
ARG VERSION_SCIP_PYTHON
# Install dependencies
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install -y --no-install-recommends \
git \
bash \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install packages
RUN npm install -g @sourcegraph/scip-python@$VERSION_SCIP_PYTHON @sourcegraph/src
ENTRYPOINT [ "scip-python" ]