lljz66 commited on
Commit
0cdeff4
·
verified ·
1 Parent(s): 8473a98

deploy: Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +45 -0
Dockerfile ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # desigma — a native Rust design tool, streamed to the browser over noVNC.
2
+ FROM debian:bookworm-slim
3
+
4
+ ENV DEBIAN_FRONTEND=noninteractive \
5
+ DISPLAY=:99 \
6
+ HOME=/home/user \
7
+ LIBGL_ALWAYS_SOFTWARE=1 \
8
+ GALLIUM_DRIVER=llvmpipe \
9
+ DESIGMA_VERSION=0.1.0-alpha.17
10
+
11
+ RUN apt-get update && apt-get install -y --no-install-recommends \
12
+ ca-certificates curl git \
13
+ xvfb x11-utils x11vnc openbox \
14
+ novnc websockify nginx \
15
+ libgl1-mesa-dri libglx-mesa0 libegl1 mesa-vulkan-drivers \
16
+ libxkbcommon0 libwayland-client0 libwayland-cursor0 libwayland-egl1 \
17
+ libx11-6 libxcursor1 libxrandr2 libxi6 libxinerama1 libxext6 libxfixes3 \
18
+ libfontconfig1 fontconfig fonts-dejavu-core fonts-liberation \
19
+ libssl3 libasound2 \
20
+ && rm -rf /var/lib/apt/lists/*
21
+
22
+ # Official Linux release binary + a shallow copy of the source for reference.
23
+ RUN set -eux; \
24
+ mkdir -p /opt/desigma; \
25
+ curl -fsSL -o /tmp/desigma.tar.gz \
26
+ "https://github.com/deepfounder-ai/desigma/releases/download/v${DESIGMA_VERSION}/desigma-${DESIGMA_VERSION}-x86_64-unknown-linux-gnu.tar.gz"; \
27
+ tar xzf /tmp/desigma.tar.gz -C /opt/desigma; \
28
+ rm /tmp/desigma.tar.gz; \
29
+ BIN="$(find /opt/desigma -type f -name desigma | head -1)"; \
30
+ test -n "$BIN"; \
31
+ chmod +x "$BIN"; \
32
+ ln -sf "$BIN" /usr/local/bin/desigma; \
33
+ git clone --depth 1 https://github.com/deepfounder-ai/desigma /opt/desigma-src; \
34
+ rm -rf /opt/desigma-src/.git
35
+
36
+ COPY nginx.conf /etc/nginx/nginx.conf
37
+ COPY start.sh /usr/local/bin/start.sh
38
+
39
+ RUN chmod +x /usr/local/bin/start.sh \
40
+ && useradd -m -u 1000 user \
41
+ && chown -R user:user /opt/desigma /opt/desigma-src /home/user
42
+
43
+ USER user
44
+ EXPOSE 7860
45
+ CMD ["/usr/local/bin/start.sh"]