The docker-machine command offers very cool features in order to operate with Docker images/container. The first basic features I would like to present in this tutorial.
Preconditions
- Create REST API mock server with Docker successfully completed
Preparation
# start VM MBP:~ lupin$ docker-machine start apimock # connect your shell to the machine MBP:~ lupin$ docker-machine env apimock MBP:~ lupin$ eval $(docker-machine env apimock) # check status MBP:~ lupin$ docker-machine ls
The output should now resemble the following example:
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS apimock * virtualbox Running tcp://192.168.99.100:2376 v1.11.0
Start and access Docker container
… a little hint …
… leave container without stopping …
Copy files
How cool is that?