In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how Docker implements the function of developing Android applications in browsers". In daily operation, I believe many people have doubts about how to develop Android applications in browsers with Docker. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the questions of "how to realize the functions of developing Android applications in browsers by Docker". Next, please follow the editor to study!
Step 1: deploy the docker server
I chose digitalocean's Singapore server, remember, you have to choose foreign server, you know the reason.
If you are not a digitalocean server, you can install docker in the following ways:
Sudo curl-ssl https://get.docker.com/ | shsudo usermod-ag docker your-user # set docker to run as non-root users to ensure security.
Select the server image on which docker has been deployed
Select the server image on which docker has been deployed
Ssh keys Settin
Ssh keys Settin
Ssh keys setting description
To connect to the server ssh- I your-ssh-keys root@yourip, perform the following steps:
Apt-get updateapt-get dist-upgradeapt-get install language-pack-zh-hanslocale-gen zh_cn.utf-8
Step 2: install eclipse che
Docker pull codenvy/chedocker images
Seeing the output below indicates that it is successful.
Repository tag image id created sizecodenvy/che latest 1401509fc68f 39 hours ago 613.7 mb
Step 3: start the container
The simplest startup command:
Docker run-ti-- privileged-- name=che-- net=host-p 808015 8080-p 32768-32788 purse 32768-32788-v / var/run/docker.sock:/var/run/docker.sock codenvy/che
Or use compose to start:
Install compose (see 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-composechmod + x / usr/local/bin/docker-compose
After installation, create a new folder, create a new yaml file with the following contents, and then execute docker-compose up to 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 startup commands look, do not know what compose can see here compose installation and use of the introduction.
Step 4: develop android
Basically, there will be no problem here, first of all, you need to create a new android project, you can check the image of codenvy (you can look for information about the relationship between codenvy and che).
Codenvy has built a number of android development images, which can be used directly by pull.
Select a demo
Select a demo
Select an image to start
Select an image to start
Configs can view dockerfile
View dockerfile
In the browser development android,app interface is displayed remotely through vnc, you need a more advanced browser, chrome or firefox can.
Choosing to install apk automatically installs apk
Choose to install apk
Hello world
Simulator displayed by vnc
At this point, the study on "how Docker implements the function of developing Android applications in browsers" is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.