Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Use Docker / LXC quickly launch a desktop system     - Apache Web Security Linux systems (Linux)

- Tree Traversals Again (Programming)

- Oracle 11g manually create a database (Database)

- Linux System Getting Started Learning: The Linux ac command (Linux)

- Using shell users or virtual users to login to pureftpd (Linux)

- gzip, bzip2, xz, tar, zip compression, archive Detailed (Linux)

- Django1.8 return json json string and the string contents of the received post (Programming)

- Actual SSH port forwarding (Linux)

- Python 3.5 await / async (Programming)

- GEC2440 easiest a kernel compile Linux2.6.30.4 (Programming)

- Ubuntu 14.04 configure JDK1.8.0_25, switchable version (Linux)

- Upgrade installation manual CentOS6.5 GCC4.8.2 (Linux)

- The Zabbix2.4.5 source compiler installation under Ubuntu 14.04 (Server)

- Ten linux version of the system (Linux)

- To update Python version under CentOS system (Linux)

- Linux kernel log --dmesg (Linux)

- Teach you how to protect the security of Linux desktop (Linux)

- zBackup: A versatile tool to remove duplicate backup (Linux)

- Linux initialization init system - UpStart (Linux)

- Nginx version of helloworld (Server)

 
         
  Use Docker / LXC quickly launch a desktop system
     
  Add Date : 2018-11-21      
         
         
         
  Docker is dotCloud currently is open source engine designed to provide an automated application deployment solution, simply means that, quickly create a container (similar to the virtual machine) on a Linux system, and to deploy and run the application on the container, and through the configuration file can easily automate the installation application deployment and upgrades, very convenient. Because of the use of the container, so you can easily put the production and development environments separate, independently of each other, which is a docker most popular play. More games are played as well as large-scale web applications, database deployment, continuous deployment, clustering, test environment, service-oriented cloud computing, virtual desktops VDI and so on.
 
Docker use the Go language, use cgroup resource isolation, container technology uses LXC. LXC has matured enough to be using multiple mainstream PaaS service providers (such as dotCloud), some domestic companies are also using the Internet (such as Tencent). Although there are attempts to resolve the issue of deployment of automation, Docker's solution is different from what we often referred Puppet / Chef, though they take different routes, but can also be used together with.
 
It says the Docker had a lot of play, play is described below: created on the server desktop systems with docker, and then connect the desktop on the remote client through ssh, it can be seen as the civilian population of VDI solutions.

Install Docker / LXC

If the Linux kernel 3.8 the previous kernel, or lack aufs kernel modules need to install additional expansion modules:

$ Sudo apt-get install linux-image-extra-`uname -r`
Installation lxc-docker:

$ Sudo apt-get install software-properties-common
$ Sudo add-apt-repository ppa: dotcloud / lxc-docker
$ Sudo apt-get update
$ Sudo apt-get install lxc-docker
Run a simple system

Run docker will automatically download an Ubuntu mirror (first run only need to download), and run a ubuntu system (similar to virtual machine) and shell in a container (container) where:

$ Docker run -i -t ubuntu / bin / bash
Click on the host ps found docker lxc-start using the tools and /var/lib/docker/containers/.../config.lxc in the parameters to start a lxc container and run / bin / bash program:

$ Ps aux | grep docker
root 28103 0.0 0.0 21164 1116 S 10:52 0:00 lxc-start -n a581df505cb9ea07e93de28d76fc9b4e1ee48b981ce994740efdaa65d0d307a3 -f /var/lib/docker/containers/a581df505cb9ea07e93de28d76fc9b4e1ee48b981ce994740efdaa65d0d307a3/config.lxc -? / sbin / init -g 172.16.42.1 -e HOME = / -e PATH = / usr / local / sbin: / usr / local / bin: / usr / sbin: / usr / bin: / sbin: / bin -e DEBIAN_FRONTEND = noninteractive - / bin / bash / src / startup .sh
Run a Hello world

Start a ubuntu system then prints hello world, embarrassing, a ubuntu system exists to print a hello world, the world has changed, reversed, the status of the operating system and applications reversed ~

$ Docker run -i -t ubuntu echo hello world
hello world
Run a "desktop" system

Take a look at how to start a "desktop" system, according to the docker-desktop project to approach and start here Dockerfile build a simple "desktop":

$ Docker build -t vpsee / docker-desktop git: //github.com/rogaha/docker-desktop.git
Step 1: FROM ubuntu: 12.10
 ---> B750fe79269d
...
Successfully built 7774f89504e5
build docker images can be used after the command to see:

$ Docker images
REPOSITORY TAG ID CREATED SIZE
ubuntu 12.04 8dbd9e392a96 3 months ago 131.5 MB (virtual 131.5 MB)
ubuntu 12.10 b750fe79269d 3 months ago 24.65 kB (virtual 180.1 MB)
ubuntu latest 8dbd9e392a96 3 months ago 131.5 MB (virtual 131.5 MB)
ubuntu precise 8dbd9e392a96 3 months ago 131.5 MB (virtual 131.5 MB)
ubuntu quantal b750fe79269d 3 months ago 24.65 kB (virtual 180.1 MB)
base latest b750fe79269d 3 months ago 24.65 kB (virtual 180.1 MB)
base ubuntu-12.10 b750fe79269d 3 months ago 24.65 kB (virtual 180.1 MB)
base ubuntu-quantal b750fe79269d 3 months ago 24.65 kB (virtual 180.1 MB)
base ubuntu-quantl b750fe79269d 3 months ago 24.65 kB (virtual 180.1 MB)
vpsee / docker-desktop latest 7774f89504e5 18 minutes ago 12.29 kB (virtual 1.576 GB)
Just build a good start this "desktop" it, is this note a581df505cb9 container ID:

$ Docker run -d vpsee / docker-desktop
a581df505cb9
This system has its own internal IP address, can not directly access the outside world, so in order to ssh login from the outside, then it needs to service the ssh port (22) and a port on the host to be mapped by docker port command so that access host on the 49153 port is an access port 22 inside the container:

$ Docker port a581df505cb9 22
49153
Look at the currently running container:

$ Docker ps
ID IMAGE COMMAND CREATED STATUS PORTS
a581df505cb9 vpsee / docker-desktop: latest / bin / bash / src / start 24 minutes ago Up 24 minutes 49153-> 22
Then we can on the Mac / Linux client access via ssh this "desktop" on:

$ Ssh -YC -c blowfish docker@192.168.2.45 -p 49153 ./docker-desktop
docker@192.168.2.45's password:
Note that the above is a randomly generated password (password every time you create a new system will change), what is it that your password? By docker logs can be found at:

$ Docker logs a581df505cb9
User: docker Password: ieFi2iu1Phie
Adding user `docker 'to group` sudo' ...
Adding user docker to group sudo
Done.
.bashrc
.config /
.config / rox.sourceforge.net /
.config / rox.sourceforge.net / ROX-Filer /
.config / rox.sourceforge.net / ROX-Filer / pb_Default
.config / rox.sourceforge.net / ROX-Filer / globicons
.config / rox.sourceforge.net / ROX-Filer / panels
.config / rox.sourceforge.net / ROX-Filer / menus2
.config / rox.sourceforge.net / ROX-Filer / Options
spring-desktop-wallpaper-1920x1200-0911085.jpg
docker-desktop
     
         
         
         
  More:      
 
- Getting the Linux shell flow control statements (Programming)
- Git Installation and Configuration (Network Agent settings) (Linux)
- ls command: 15 Level Linux interview question (Linux)
- Android working with Volley Comments (Programming)
- Java Class file format parsing (Programming)
- Linux firewall security (Linux)
- The default permissions for files and directories under Linux computing (Linux)
- The Java ThreadLocal (Programming)
- MySQL composite partition (Database)
- CentOS install SVN server configuration and automatically synchronized to the Web directory (Server)
- Linux file compression and archiving (Linux)
- MySQL monitoring tools -orzdba (Database)
- MongoDB configuration in Ubuntu 14.04 (Database)
- Compare Several MySQL environmental issues (Database)
- Shell for loop (Programming)
- How to create a someone project on github (Linux)
- Oracle ordinary users show parameter method (Database)
- Category prevent DoS attacks against Linux (Linux)
- Ubuntu: To install chat client Chatty 0.6.1 (Linux)
- awk Programming Model (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.