CentOS Docker Installation | Rookie Tutorial (runoob.com)
Docker install Tomcat | rookie tutorial (runoob.com)
- Enter the command to install with one click
curl -fsSL https://get.docker.com | bash -s docker --mirror aliyun
- Use docker to pull the official image
docker pull tomcat
- View the id of the downloaded mirror
docker images
- Start tomcat, create mapping and mount
docker run --name tomcat -p 8080:8080 -v $PWD/tomcat:/usr/local/tomcat/webapps -d tomcat
Here the webapps directory in the container is mapped to the tomcat directory under the current directory
- Create default ROOT folder
cd tomcat
mkdir ROOT
Move the website files into the ROOT folder