Installation de Docker + Ubuntu + NoVNC

Installation de Docker + Ubuntu + NoVNC.

Distribution de travail : Lubuntu 18.04 LTS

I/ Installation de Docker.

1/ Mise-à-jour des paquets.

util05@station01:~$ sudo apt update

2/ Installation des paquets pour l’installation du dépôt ‘Docker’.

util05@station01:~$ sudo apt install apt-transport-https ca-certificates curl software-properties-common

3/ Ajout du dépôt ‘Docker’.
Créer :

/etc/apt/sources.list.d/docker.list

Ajouter :

deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable

4/ Ajout de la clé du dépôt de Docker.

util05@station01:~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

5/ Mise-à-jour des paquets.

util05@station01:~$ sudo apt update

6/ Installation de Docker Community Edition.

util05@station01:~$ sudo apt install docker-ce

7/ Vérification.

util05@station01:~$ docker --version
Docker version 18.09.0, build 4d60db4

8/ Répertoire de travail.

util05@station01:~$ cd DOCKER/
util05@station01:~/DOCKER$

9/ Test.

util05@station01:~/DOCKER$ docker run hello-world
...
Hello from Docker!
This message shows that your installation appears to be working correctly.
...

10/ Erreur.

docker: Got permission denied while trying to connect to the Docker daemon socket

Solution :

util05@station01:~$ sudo usermod -a -G docker $USER
util05@station01:~$ sudo chmod 666 /var/run/docker.sock

11/ Lien.

https://linuxconfig.org/how-to-install-docker-on-ubuntu-18-04-bionic-beaver

II/ Création d’une image Docker ‘Ubuntu + NoVNC’.

1/ Téléchargement du code source de l’image Docker.

util05@station01:~/DOCKER$ git clone --recursive https://github.com/fcwu/docker-ubuntu-vnc-desktop.git
util05@station01:~/DOCKER$ cd docker-ubuntu-vnc-desktop/
util05@station01:~/DOCKER/docker-ubuntu-vnc-desktop$

2/ Modification des paramètres de compilation de l’image.

Ouvrir :

Makefile

Chercher :

REPO  ?= dorowu/ubuntu-desktop-lxde-vnc

Remplacer par :

REPO  ?= nekrofage/ubuntu-desktop-lxde-vnc

Chercher :

-e USER=doro -e PASSWORD=mypassword \

Remplacer par :

-e USER=util01 -e PASSWORD=mot2passe \

Ouvrir :

Dockerfile

Chercher :

tw.archive.ubuntu.com

Remplacer par :

fr.archive.ubuntu.com

Chercher :

fcwu.tw@gmail.com

Remplacer par :

lesanglierdesardennes@gmail.com

Ouvrir :

image/etc/supervisor/conf.d/supervisord.conf

Chercher :

command=/usr/bin/openbox

Remplacer par :

command=/usr/bin/openbox --startup /etc/xdg/openbox/autostart

3/ Construction de l’image.

util05@station01:~/DOCKER/docker-ubuntu-vnc-desktop$ make
...
 ---> ecf31c0f5479
Successfully built ecf31c0f5479
Successfully tagged nekrofage/ubuntu-desktop-lxde-vnc:latest
util05@station01:~/DOCKER/docker-ubuntu-vnc-desktop$

4/ Listage des images Docker disponibles.

util05@station01:~/DOCKER/docker-ubuntu-vnc-desktop$ docker image ls
REPOSITORY                          TAG                 IMAGE ID            CREATED             SIZE
nekrofage/ubuntu-desktop-lxde-vnc   latest              ecf31c0f5479        25 minutes ago      1.21GB
                                            af0f9f3199df        25 minutes ago      631MB
                                            c93fdb645109        About an hour ago   964MB
ubuntu                              16.04               a51debf7e1eb        4 weeks ago         116MB
ubuntu                              18.04               93fd78260bd1        4 weeks ago         86.2MB
hello-world                         latest              4ab4c602aa5e        3 months ago        1.84kB
util05@station01:~/DOCKER/docker-ubuntu-vnc-desktop$

5/ Lancement de l’image.

util05@station01:~/DOCKER/docker-ubuntu-vnc-desktop$ docker run -p 6080:80 nekrofage/ubuntu-desktop-lxde-vnc
2018-12-20 12:41:32,818 CRIT Supervisor running as root (no user in config file)
2018-12-20 12:41:32,818 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2018-12-20 12:41:32,855 INFO RPC interface 'supervisor' initialized
2018-12-20 12:41:32,855 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-12-20 12:41:32,855 INFO supervisord started with pid 16
...
2018-12-20 12:41:34,900 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-12-20 12:41:34,900 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-12-20 12:41:37,856 INFO  Listening on http://localhost:6079 (run.py:87)

7/ Visualisation.

http://127.0.0.1:6080/

Comments are closed, but trackbacks and pingbacks are open.