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
Replace it with the optimal database connection p...
The MySQL built on Tencent Cloud is always very s...
Table of contents The creation and confusion of n...
Table of contents Introduction to Anaconda 1. Dow...
The local environment is Windows 10 + WSL2 (Ubunt...
1. Implement call step: Set the function as a pro...
Table of contents Preface Why introduce unit test...
Table of contents 1. Overview 2. Define a simple ...
Select the category selection. After testing, IE ...
Query Rewrite Plugin As of MySQL 5.7.6, MySQL Ser...
Method 1: Adding values Let's go to MDN to se...
Problem: The MySQL database crashed unexpectedly ...
1. Command Introduction bzip2 is used to compress...
This article mainly explains how to use clearfix a...
This article mainly introduces how to evenly dist...