A lightweight, containerized remote desktop environment based on Debian 12 (Bookworm) Slim. It provides a full XFCE4 desktop accessible via RDP (Remote Desktop Protocol) or a Web Browser (NoVNC).
Purpose: This image is specifically designed to provide a safe, isolated environment to work and play with Antigravity from Google. It comes with the Antigravity package pre-installed and includes a secure Chromium browser for interaction and development.
Ensure the following three files exist in your build directory:
Dockerfile- The image definition.entrypoint.sh- Handles user creation, password generation, and DBus setup.supervisord.conf- Manages the VNC, XRDP, and Web processes.
You can either use the pre-built image from GitHub (Recommended) or build it yourself.
Simply run the following command. Docker will automatically pull the image if it's not found locally.
docker run -d \
--name antigravity-sandbox \
--cap-add=SYS_ADMIN \
--security-opt apparmor=unconfined \
-p 3390:3389 \
-p 6901:6901 \
-e PASSWORD=SecretPassword123 \
--shm-size=1g \
-v $(pwd)/antigravity-data:/home/antigravity \
ghcr.io/duizendstra/antigravity-sandbox:latestIf you want to modify the image or built it yourself:
- Open a terminal in the project directory.
- Build the image:
docker build -t antigravity-sandbox . - Run the image (note the image name is just
antigravity-sandbox):docker run -d \ --name antigravity-sandbox \ --cap-add=SYS_ADMIN \ --security-opt apparmor=unconfined \ -p 3390:3389 \ -p 6901:6901 \ -e PASSWORD=SecretPassword123 \ --shm-size=1g \ -v $(pwd)/antigravity-data:/home/antigravity \ antigravity-sandbox
--cap-add=SYS_ADMIN: Required. Allows Chromium to create new user namespaces for its sandbox.--security-opt apparmor=unconfined: Required. Prevents Docker's default AppArmor profile from blocking the browser's internal isolation techniques.--shm-size=1g: Critical. Increases shared memory. Without this, Chromium and XFCE applications will crash frequently.-p 3390:3389: Maps the container's RDP port to host port 3390.-p 6901:6901: Maps the container's NoVNC port to host port 6901.-e PASSWORD=...: Sets the password for theantigravityuser,sudoaccess, and VNC.-v $(pwd)/antigravity-data:/home/antigravity: Persistence. Maps the host folderantigravity-datato the container's home directory. This ensures your files are saved on your local machine and not lost when the container is deleted.
This offers the best performance, clipboard sharing, and retina resolution support.
- Open Windows App (formerly Microsoft Remote Desktop) on your Mac.
- Click the + button in the top toolbar and select Add PC.
- PC name:
localhost:3390- Note for OrbStack: You can also use
antigravity-sandbox.orb.local:3390.
- Note for OrbStack: You can also use
- User account: Click the dropdown and select Add User Account...
- Username:
antigravity - Password:
SecretPassword123(or your custom password). - Friendly name:
Antigravity User - Click Add.
- Username:
- Friendly name:
Antigravity Sandbox - Click Add.
- Double-click the new icon to connect.
- Certificate Warning: You will see a warning because the container uses a self-signed certificate. Click Continue.
Use this for quick access without installing a client.
- OrbStack URL: http://antigravity-sandbox.orb.local:6901/vnc.html
- Localhost URL: http://localhost:6901/vnc.html
- Password: The value set in the
PASSWORDenvironment variable.
| Variable | Default | Description |
|---|---|---|
PASSWORD |
password |
Sets the password for the system user and VNC. |
The resolution is defined in the supervisord.conf file. To change it:
- Open
supervisord.conf. - Locate the
[program:vnc]section. - Modify the
-geometry 1920x1080flag to your desired resolution. - Rebuild the Docker image.
- Sudo Access: The
antigravityuser hassudoprivileges. Combined with the known password, this gives the user root access within the container. - Network Exposure: Do not expose ports 3390 or 6901 directly to the public internet. RDP is a frequent target for brute-force attacks. Use an SSH tunnel or VPN.
- Container Privileges: Running with
--cap-add=SYS_ADMINreduces the isolation between the container and the host kernel compared to a standard container. This is necessary for the browser sandbox but should be noted for high-security environments.
Chromium crashes immediately ("Aw, Snap!")
Ensure you included --cap-add=SYS_ADMIN and --security-opt apparmor=unconfined in your run command.
The Desktop is black or apps crash randomly
Ensure you included --shm-size=1g. Modern GUI applications require significant shared memory buffers.
"exited: dbus (exit status 1; not expected)"
This indicates the machine-id is missing or the /var/run/dbus directory was not created. Ensure you are using the latest entrypoint.sh provided in the solution, which handles dbus-uuidgen generation.
License: This project is licensed under the MIT License. See the LICENSE file for details.
Disclaimer:
- Not an Official Product: This project is an independent, community-driven tool designed to facilitate the use of the "Antigravity" package. It is not affiliated with, endorsed by, or maintained by Google LLC.
- Security Warning: This container is configured with reduced security isolation (
--cap-add=SYS_ADMIN,apparmor=unconfined) to enable specific browser functionalities. It also includessudoaccess for the default user.- Do not expose this container directly to the public internet.
- Do not use this container to process sensitive personal or financial data.
- The authors assume no responsibility for any security compromises or data loss resulting from the use of this configuration.