-->
Developing Android apps in the browser
There is a need to use the knowledge of Docker, Che released after the Android application development of a tool, here on how to implement this feature on the line detailed:
Eclipse Che
Che recently released the official version, so I'd like to introduce Android on Che.
The use of Che requires some Docker knowledge, just a little bit, because Che is based on Docker, so understanding Docker helps to understand how Che works.
No nonsense, the tutorial is only four steps to begin with.
Step one: Deploy the Docker server
I chose the Digitalocean Singapore server, remember, must choose foreign, the reason you understand.
If you are not a Digitalocean server, then you can install Docker in the following ways:
sudo curl-ssl https://get.docker.com/| SH
sudo usermod-ag docker your-user #设置Docker以非Root用户运行 to ensure safety.
Select a server mirror that has been deployed Docker
Select a server mirror that has been deployed Docker
SSH Keys Settings
SSH Keys Settings
SSH Keys Settings Description
Connect ssh -i your-ssh-keys root@yourIP
to the server and perform the following steps:
Apt-get update
apt-get dist-upgrade
apt-get install Language-pack-zh-hans Locale-gen
. UTF-8
Step two: Install Eclipse Che
Docker pull Codenvy/che
Docker images
See the following output indicates success.
REPOSITORY TAG IMAGE ID CREATED SIZE
codenvy/che latest 1401509fc68f Ago 613.7 MB
Step three: Start the container
The simplest startup command:
Docker Run-ti--privileged--name=che--net=host-p 8080:8080-p 32768-32788:32768-32788-v/var/run/docker.sock:/var/ru N/docker.sock Codenvy/che
Or use compose to start:
Install compose (see here for the latest version of the installation command)
Curl-l https://github.com/docker/compose/releases/download/1.6.2/docker-compose-' uname-s '-' uname-m ' >/usr/ Local/bin/docker-compose
chmod +x/usr/local/bin/docker-compose
Once installed, create a new folder, create a new Yaml file inside, and then execute to docker-compose up
start Che.
Che:
image:codenvy/che:latest
command: >
bash-c "
sudo rm-rf/home/user/che/lib-copy/* & &
sudo rm-rf/home/user/che/tomcat/temp/local-storage/* &&
mkdir-p/home/user/che/lib-copy/ &&
sudo chown-r user:user/home/user/che &&
cp-rf/home/user/che/lib/*/home/user/che/ Lib-copy &&
/home/user/che/bin/che.sh run-d
"
Net:" Host "
volumes:
-"/var/run/ Docker.sock:/var/run/docker.sock "
-"/home/user/che/lib:/home/user/che/lib-copy "
-"/home/user/che/ Workspaces:/home/user/che/workspaces "
-"/home/user/che/tomcat/temp/local-storage:/home/user/che/tomcat/ Temp/local-storage "
Container_name:che
Detailed launch command to see the official document, do not know what compose is here to see compose installation to get started.
Fourth step: Develop Android
Basically, there's no problem here, first you need to create a new Android project to view the Codenvy Company's image (Codenvy and Che's relationship you can look for information).
Codenvy built a number of Android development mirrors, directly pull can be used.
Select a demo
Select a demo
Select a mirrored boot
Select a mirrored boot
Configs can view Dockerfile
View Dockerfile
In the browser development Android,app interface is remotely displayed through VNC, you need a more advanced browser, Chrome or Firefox can be.
Select Install APK will automatically install APK
Select Install APK
Hello World
The emulator shown through VNC
Thank you for reading, I hope to help you, thank you for your support for this site!