-
-
Notifications
You must be signed in to change notification settings - Fork 266
Expand file tree
/
Copy pathDockerfile.slim
More file actions
39 lines (27 loc) · 1 KB
/
Copy pathDockerfile.slim
File metadata and controls
39 lines (27 loc) · 1 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
FROM node:slim AS build
RUN mkdir -p /usr/src/cloudcmd/
WORKDIR /usr/src/cloudcmd
COPY package.json /usr/src/cloudcmd/
RUN apt-get update && \
apt-get install -y build-essential python3 libncurses5-dev pkg-config && \
apt-get install -y --no-install-recommends curl ca-certificates unzip && \
curl -fsSL https://bun.sh/install | bash && \
ln -s ~/.bun/bin/bun /usr/local/bin/bun && \
chmod +x /usr/local/bin/bun && \
bun r gritty --omit dev && \
bun i gritty --omit dev && \
~/.bun/bin/bun pm cache rm && \
rm -rf /var/lib/apt/lists/*
COPY . /usr/src/cloudcmd
FROM node:slim AS runtime
COPY --from=build /usr/src/cloudcmd /usr/src/cloudcmd
COPY --from=build /root/.bun /root/.bun
LABEL maintainer="Coderaiser"
LABEL org.opencontainers.image.source="https://github.com/coderaiser/cloudcmd"
WORKDIR /
ENV cloudcmd_terminal=true
ENV cloudcmd_terminal_path=gritty
ENV cloudcmd_open=false
ENV PATH="/root/.bun/bin:$PATH"
EXPOSE 8000
ENTRYPOINT ["/usr/src/cloudcmd/bin/cloudcmd.js"]