1. Pull Tomcat
Docker pull Tomcat
2. Start the Tomcat server (here, pull the Tomcat image, which includes the JDK)
8888 (Host machine Port):8080(Docker Tomcat container port) Tomcat
3. Start in an interactive form, go to the Tomcat container and look at the file directory---find the WebApps directory
Docker exec-it My-tomcat7/bin/bash
This is a direct view of the mirrored warehouse, which also has a path address.
4. Copy the ready-to-use web app to the Docker My-tomcat container, where it is automatically deployed after it is copied and can be accessed directly
Docker CP Docker.war My-tomcat:/usr/local/tomcat/webapps
Here's the one in my notes ... When I did not know what to read when the record ... I don't know what to do with it.
5. Run the interactive shell
Docker Pull Base
# Run an interactive shell in the base image,
# Allocate a TTY, attach stdin and stdout
Docker Run-i-T Base/bin/bash
6. Start a long-running work process
# Run Docker in daemon mode
(docker-d | | echo "Docker daemon already Running") &
# Start A very useful long-running process
job=$ (Docker run-d base/bin/sh-c "while true; do Echo Hello world; Sleep 1; Done ")
# Collect The output of the job so far
Docker logs $JOB
# Kill The Job
Docker Kill $JOB
Docker combat Tomcat Deployment web App