-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (27 loc) · 1.31 KB
/
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
29
30
31
32
33
34
35
36
37
FROM --platform=linux/amd64 node:18 as build
RUN apt-get update && apt-get install -y git
RUN npm install -g pnpm json
ENV ELECTRON_MIRROR https://cdn.npm.taobao.org/dist/electron/
RUN git clone https://github.com/massCodeIO/massCode.git
RUN cd massCode && \
git checkout v3.7.0 && \
sed -i "s/snap/deb/g" config/electron-builder.ts && \
json -I -f package.json -e "this.author.email='zeohan.dxs@gmail.com'" && \
pnpm install && \
pnpm run build
FROM --platform=linux/amd64 codercom/code-server:4.16.0-bullseye
USER root
RUN apt-get update && \
apt-get install -y --no-install-recommends libnotify4 libnss3 libxss1 xdg-utils libsecret-1-0 libasound2 libgbm1 libgtk-3-0 libxtst6 libatspi2.0-0 xvfb && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /massCode/dist/masscode_3.7.0_amd64.deb /opt
RUN dpkg -i /opt/masscode_3.7.0_amd64.deb
ENV DISPLAY ':99.0'
RUN sed -i '$d' /usr/bin/entrypoint.sh
RUN echo "exec Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &" | tee -a /usr/bin/entrypoint.sh
RUN echo "exec masscode --no-sandbox > /dev/null 2>&1 &" | tee -a /usr/bin/entrypoint.sh
RUN echo 'exec dumb-init /usr/bin/code-server "$@"' | tee -a /usr/bin/entrypoint.sh
USER coder
COPY *.vsix /opt
RUN code-server --install-extension /opt/AntonReshetov.masscode-assistant-1.1.0.vsix