-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* set up astrobee_vnc docker example * adding multiple devcontainer configurations; fizing documentation link * adding all of the remote docker files * working with devcontainer remotely * adding documentation for both methods and devcontainer * adding line at the end * adding running ssh script * removing docker remote folder and just have the vscode method * updating docs for more clear display configuration --------- Co-authored-by: Trey Smith <[email protected]>
- Loading branch information
1 parent
c1d2d76
commit 101c0a8
Showing
8 changed files
with
96 additions
and
21 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
ARG UBUNTU_VERSION=20.04 | ||
ARG REMOTE=ghcr.io/nasa | ||
FROM ${REMOTE}/astrobee:latest-ubuntu${UBUNTU_VERSION} | ||
ENV DEBIAN_FRONTEND=dialog | ||
|
||
# Rationale for packages: | ||
# xvfb: X server that doesn't need GPU or physical display | ||
# x11vnc: VNC server that shares xvfb display with external VNC clients | ||
# xfce4: lightweight window manager | ||
# dbus-x11: inter-process communication needed by xfce | ||
# x11-apps: X11 apps to demo such as xeyes | ||
# x11-utils: debugging commands such as xdpyinfo | ||
# x11-xserver-utils: setup commands such as xset | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
dbus-x11 \ | ||
x11-apps \ | ||
x11-utils \ | ||
x11-xserver-utils \ | ||
x11vnc \ | ||
xfce4 \ | ||
xvfb \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN ls -l | ||
|
||
CMD ["/src/astrobee/src/scripts/start_vnc.sh"] | ||
|
||
# Expose VNC server's port | ||
EXPOSE 5900 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"dockerFile": "Dockerfile", | ||
"build": { | ||
"args": { | ||
"WORKSPACE": "${containerWorkspaceFolder}" | ||
} | ||
}, | ||
"remoteUser": "root", | ||
"overrideCommand": false, | ||
"forwardPorts": [ | ||
5900 | ||
], | ||
"runArgs": [ | ||
"-ti", | ||
"--rm", | ||
"--cap-add=SYS_PTRACE", | ||
"--security-opt=seccomp:unconfined", | ||
"--security-opt=apparmor:unconfined" | ||
], | ||
"containerEnv": { | ||
"DISPLAY": ":0", | ||
"LIBGL_ALWAYS_SOFTWARE": "1" // Needed for software rendering of opengl | ||
}, | ||
"workspaceMount": "source=${localWorkspaceFolder},target=/src/astrobee/src,type=bind", | ||
"workspaceFolder": "/src/astrobee/src" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
<html><head><meta http-equiv=Refresh content="0;url=html/index.html"></head></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
|
||
# This script is designed to be run inside the container (Dockerfile "CMD") to start up the necessary daemons. | ||
|
||
export DISPLAY=${DISPLAY:-:0} # Select screen 0 by default. | ||
x11vnc -bg -forever -nopw -quiet -display WAIT$DISPLAY & | ||
Xvfb $DISPLAY -screen 0 1024x768x16 & | ||
sleep 1 | ||
|
||
xdpyinfo | ||
|
||
# disable screen saver and power management | ||
xset -dpms & | ||
xset s noblank & | ||
xset s off & | ||
|
||
# start window manager | ||
/usr/bin/startxfce4 --replace > $HOME/wm.log & | ||
|
||
# CMD script should not exit | ||
sleep infinity |