|
1 | | -# E2B Desktop Sandbox Template |
2 | | -# |
3 | | -# This Dockerfile contains the commands to create a computer use sandbox on E2B. |
4 | | -# If you want to make your own template based on this one, make your changes |
5 | | - |
6 | | -FROM ubuntu:22.04 |
7 | | - |
8 | | -# Environment variables: |
9 | | - |
10 | | -ENV \ |
11 | | - # Avoid system prompts: \ |
12 | | - DEBIAN_FRONTEND=noninteractive \ |
13 | | - DEBIAN_PRIORITY=high \ |
14 | | - # Pip settings: \ |
15 | | - PIP_DEFAULT_TIMEOUT=100 \ |
16 | | - PIP_DISABLE_PIP_VERSION_CHECK=1 \ |
17 | | - PIP_NO_CACHE_DIR=1 |
18 | | - |
19 | | -# Desktop environment: |
20 | | - |
21 | | -RUN yes | unminimize && \ |
22 | | - apt-get update && \ |
23 | | - # X window server: |
24 | | - apt-get install -y xserver-xorg xorg x11-xserver-utils xvfb x11-utils xauth && \ |
25 | | - # XFCE desktop environment: |
26 | | - apt-get install -y xfce4 xfce4-goodies && \ |
27 | | - # Basic system utilities: |
28 | | - apt-get install -y util-linux sudo curl git wget && \ |
29 | | - # Pip will be used to install Python packages: |
30 | | - apt-get install -y python3-pip && \ |
31 | | - # Tools used by the desktop SDK: |
32 | | - apt-get install -y xdotool scrot ffmpeg |
33 | | - |
34 | | -# Streaming server: |
35 | | - |
36 | | -RUN \ |
37 | | - # VNC: \ |
38 | | - apt-get install -y x11vnc && \ |
39 | | - # NoVNC: \ |
40 | | - git clone --branch e2b-desktop https://github.com/e2b-dev/noVNC.git /opt/noVNC && \ |
41 | | - ln -s /opt/noVNC/vnc.html /opt/noVNC/index.html && \ |
42 | | - # Websockify: \ |
43 | | - apt-get install -y net-tools netcat && \ |
44 | | - pip install numpy && \ |
45 | | - git clone --branch v0.12.0 https://github.com/novnc/websockify /opt/noVNC/utils/websockify |
46 | | - |
47 | | -# User applications: |
48 | | - |
49 | | -# ~ Make your changes to this template BELOW this line ~ |
50 | | - |
51 | | -# Set the default terminal |
52 | | -RUN ln -sf /usr/bin/xfce4-terminal.wrapper /etc/alternatives/x-terminal-emulator |
53 | | - |
54 | | -# Install standard apps |
55 | | -RUN apt-get install -y x11-apps \ |
56 | | - libreoffice \ |
57 | | - xpdf \ |
58 | | - gedit \ |
59 | | - xpaint \ |
60 | | - tint2 \ |
61 | | - galculator \ |
62 | | - pcmanfm |
63 | | - |
64 | | -# Install Firefox |
65 | | -RUN apt-get install -y software-properties-common && \ |
66 | | - add-apt-repository ppa:mozillateam/ppa && \ |
67 | | - apt-get install -y --no-install-recommends \ |
68 | | - firefox-esr |
69 | | - |
70 | | -# Install Chrome |
71 | | -RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ |
72 | | - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \ |
73 | | - apt-get update && \ |
74 | | - apt-get install -y google-chrome-stable |
75 | | - |
76 | | -# Set Firefox as default browser |
77 | | -RUN update-alternatives --set x-www-browser /usr/bin/firefox-esr |
78 | | - |
79 | | -# Copy Chrome desktop shortcut |
80 | | -COPY google-chrome.desktop /usr/share/applications/google-chrome.desktop |
81 | | - |
82 | | -# Install VS Code |
83 | | -RUN apt-get install apt-transport-https && \ |
84 | | - wget -qO- https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \ |
85 | | - add-apt-repository -y "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" && \ |
86 | | - apt-get update -y && \ |
87 | | - apt-get install -y code |
88 | | -RUN mkdir -p /home/user/.config/Code/User |
89 | | -COPY ./settings.json /home/user/.config/Code/User/settings.json |
90 | | - |
91 | | -# Copy desktop background for XFCE |
92 | | -COPY ./wallpaper.png /usr/share/backgrounds/xfce/wallpaper.png |
93 | | -RUN mkdir -p /home/user/.config/xfce4/xfconf/xfce-perchannel-xml/ |
94 | | -COPY ./xfce4-desktop.xml /home/user/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml |
95 | | - |
96 | | -# Install gtk-launch and update desktop database |
97 | | -RUN apt-get install -y libgtk-3-bin && \ |
98 | | - update-desktop-database /usr/share/applications/ |
99 | | - |
100 | | -# Copy firefox policies |
101 | | -COPY firefox-policies.json /usr/lib/firefox-esr/distribution/policies.json |
102 | | -COPY firefox-autoconfig.js /usr/lib/firefox-esr/defaults/pref/autoconfig.js |
103 | | -COPY firefox.cfg /usr/lib/firefox-esr/firefox.cfg |
| 1 | +FROM e2bdev/desktop:latest |
0 commit comments