Install Docker $ apt install docker.io -y If the resource cannot be found, you need to update the resource library. The command is: $ sudo apt-get update && sudo apt-get upgrade Check the Docker version $ docker -v For more Docker-related knowledge, please visit: https://www.docker.com/ Docker installs mysql $ docker pull mysql Install Tomcat on Docker $ docker pull tomcat Launch the instance After docker pulls the above two container images, the image list can be obtained through the following command $ docker images -a You can see the two images that were pulled to the local computer. Next, start the tomcat and mysql instances respectively. The commands are as follows: $ sudo docker run --name image_nick_name image_name:image_tag Start mysql: $ sudo docker run --name mysql -p 3400:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest Start tomcat: $ sudo docker run -it -d --name tomcat tomcat:latest After startup, you can successfully access tomcat and mysql on the server $ mysql -u root -h 114.215.29.39 -P 3400 -p123456 Access ip: http://ip:10050/ This is the end of this article about the installation and deployment examples of Docker on Linux. For more information about the installation and deployment of Docker on Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Solution to the problem of invalid line-height setting in CSS
>>: Solution to find all child rows for a given parent row in MySQL
Preface Swap is a special file (or partition) loc...
This article example shares the specific code for...
CentOS official website address https://www.cento...
Effect The effect diagram is as follows Implement...
1. Preliminary preparation (windows7+mysql-8.0.18...
I just joined a new company recently. After getti...
Implement div wheel zooming in and out in Vue pro...
Preface When the code runs and an error occurs, w...
Table of contents 1. Compiler code format specifi...
--When connecting to the database, the matching r...
Let's take a look at the detailed method of b...
Friends who are doing development, especially tho...
I wrote a test program before, in which adding and...
1. Inline elements only occupy the width of the co...
Table of contents Preface: Kind tips: variable 1....