forked from QwenLM/qwen-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (47 loc) · 1.48 KB
/
Dockerfile
File metadata and controls
54 lines (47 loc) · 1.48 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
45
46
47
48
49
50
51
52
53
54
FROM docker.io/library/node:20-slim
ARG SANDBOX_NAME="sceni-code-sandbox"
ARG CLI_VERSION_ARG
ENV SANDBOX="$SANDBOX_NAME"
ENV CLI_VERSION=$CLI_VERSION_ARG
# install minimal set of packages, then clean up
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
make \
g++ \
man-db \
curl \
dnsutils \
less \
jq \
bc \
gh \
git \
unzip \
rsync \
ripgrep \
procps \
psmisc \
lsof \
socat \
ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# set up npm global package folder under /usr/local/share
# give it to non-root user node, already set up in base image
RUN mkdir -p /usr/local/share/npm-global \
&& chown -R node:node /usr/local/share/npm-global
ENV NPM_CONFIG_PREFIX=/usr/local/share/npm-global
ENV PATH=$PATH:/usr/local/share/npm-global/bin
# create workspace directory and set as working directory
RUN mkdir -p /workspace && chown -R node:node /workspace
WORKDIR /workspace
# switch to non-root user node
USER node
# install @scenius/sceni-code and clean up
COPY packages/cli/dist/scenius-sceni-code-*.tgz /usr/local/share/npm-global/sceni-code.tgz
COPY packages/core/dist/scenius-sceni-code-core-*.tgz /usr/local/share/npm-global/sceni-code-core.tgz
RUN npm install -g /usr/local/share/npm-global/sceni-code.tgz /usr/local/share/npm-global/sceni-code-core.tgz \
&& npm cache clean --force \
&& rm -f /usr/local/share/npm-global/sceni-{code,code-core}.tgz
# default entrypoint when none specified
CMD ["sceni"]