Q:

Docker run syntax

Can anyone clarify the syntax in this command:
$ docker run -d -P --name web -v /src/webapp:/webapp training/webapp python app.py

I can see that:
Host directory: /src/webapp
Container: /webapp

but what is training/webapp?  Is that the image?  If so, why is there a /? 
And is everything after that (i.e. python app.py) the command that you want to run in the container? 
=====
And to clarify with this command: 
$ docker run -d -P --name web -v /webapp training/webapp python app.py

How does it work if you ONLY specify -v /webapp - is that equivalent to /webapp:/webapp? 

A:

You can find the documentation for docker run here
The basic structure looks like this:
$ docker run [OPTIONS] IMAGE[:TAG|@DIGEST] [COMMAND] [ARG...]

-d let's you run your docker container in detached mode, so you won't see the console output
-P publish all exposed ports to the host interfaces
--name the name of your container
-v the volume you mount host/path:container/path, where in your case /src/webapp is on your local machine and /webapp is inside your container

training/webapp is the username and image name for the docker image.  I have linked the image's location on DockerHub for you
python app.pyare the command (python) and the argument run when the container starts (app.py)

