Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/natlee/dev-dock

Creating a common GUI image by using docker for developing.
https://github.com/natlee/dev-dock

browser conda-environment development-environment docker docker-image gui-application gui-interface novnc ssh-server vnc vscode xfce-desktop

Last synced: 16 days ago
JSON representation

Creating a common GUI image by using docker for developing.

Awesome Lists containing this project

README

        

# Dev Dock

A GUI Container using Xfce with noVNC.

> Only support x86/64.

![desktop](./doc/desktop.png)

> Also can check the GUI [Management](https://github.com/NatLee/development-container-manager).

This repo is creating a common GUI image by using docker for developing.

The image included the following components:

* Xfce Desktop
* VNC Server (default VNC port: 5901)
* VNC Client with HTML5 support (default http port: 6901)
* OpenSSH (default SSH port: 22)
* Git
* Mini Conda
* VScode
* Firefox
* Anydesk

## Run docker without sudo

```bash
sudo groupadd docker && gpasswd -a $USER docker
```

*** You can change $USER to match your preferred user name if you do not want to use your current user**

## Usage

### Quick start

- Build an image and run a testing container.

```bash
docker-compose build && docker-compose up
```

### NVidia GPU support

If you need use this with NVIDIA GPUs, you need to follow this in the main system.

- [Installing the NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)

When NVidia Docker is installed, use this command to run a testing container with GPU support.

```bash
docker-compose -f docker-compose.nvidia.yml build && docker-compose -f docker-compose.nvidia.yml up
```

## Connection

If you have not change the default port yet, you can use the services with the following ports.

* VNC port: 5901, connect with host `` and ``
* noVNC port: 6901, connect via `http://:6901/?password=`
* SSH port: 22, connect with command line `ssh root@:`

*** You can login SSH with `default user` or `root`.**

## Parameters

You can use these parameters to set some settings.

* Map ports
- 5901 (vnc protocol)
- 6901 (vnc web access)
- 22 (ssh protocol)

`-p 12345:5901 -p 13579:6901 -p 24680:22`

* Set the same timezone

`-v /etc/localtime:/etc/localtime:ro`

* Mount a volume

`-v :<>YOUR_CONTAINER_PATH>`

* Mount a network disk as a volume

`sudo mount -t cifs -o username=,password=,vers=3.0 // `

`-v :<>YOUR_CONTAINER_PATH>`

* Override the VNC resolution

`-e VNC_RESOLUTION=1920x1080`

* Change the VNC password

`-e VNC_PW=`

* Change root password

`-e ROOT_PASSWORD='root'`

* Add user

`-e DEFAULT_USER='user' -e DEFAULT_USER_PASSWORD='user'`

### Execution with the only docker command

**You need to restart the container to make Chinese input method work after first login into VNC.**

* Run a testing container

```bash
docker run -d -p 12345:5901 -p 13579:6901 -p 24680:22 \
-v /etc/localtime:/etc/localtime:ro \
-v /home/infor/Desktop/test/:/root/Desktop/ \
-e VNC_PW=infor1234 \
-e VNC_RESOLUTION=1600x900 \
-e DEFAULT_USER='test' -e DEFAULT_USER_PASSWORD='test' \
-e ROOT_PASSWORD='root' \
--name test test-vnc-gui
```

# License

[MIT](./LICENSE)