docker mount host directory to container

docker mount host directory to container


docker on shared hosting

docker run -d –mount type=bind,source=”/var/www/html/webapps”,target=/usr/local/tomcat/webapps -it –rm -p 8888:8080 tomcat:8.0
# /var/www/html/webapps – contains tomcat war files in host maschine
# /usr/local/tomcat/webapps is in container tomcat webapps directory
# -p 8888:8080, 8888 is where you can see this app, 8080 is tomcat internal port inside container

Leave a Reply

Your email address will not be published. Required fields are marked *