You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Share with Docker your C: drive, mount it on / with folder name c
In VirtualBox increase default VM memory size to 2-4 Gb
Put all required configuration files under ./opts/
Edit service tomcat in docker-compose.yaml to have correct environment variable JAVA_OPTS
Put all required war files in folder ./tomcat/webapps/
If some DB preparation is needed, put SQL scripts in ./mysql/sql_scripts/. All sql scripts, located in sql_scripts folder will be executed in alphabetical order
Start docker-machine and remember it's IP. It will be needed during test run.
To up containers run docker-compose up, to stop containers run docker-compose stop
To stop and cleanup all containers, volumes and networks: docker-compose down -v
All output logs from applications will be stored in ./tomcat/logs
Tips&Tricks
To up all containers execute docker-compose up or docker-compose up -d to run containers in background mode.
Then you can access your containers by docker-compose ps
To stop containers run docker-compose stop
To stop and cleanup all containers, volumes and networks: docker-compose down -v
To run command in container docker-compose exec <service name> <command to run>
To connect from tomcat container to DB in mysql container: jdbc:mysql://mysql:3306
To measure resources: docker stats
Build image: docker build -t shabliad/tomcat .
Run container: docker run -it --rm -p 8080:8080 shabliad/tomcat
Run container and open terminal docker run -it shabliad/tomcat bash
To run container and map local webapps folder to webapps folder in container: docker run -it --rm -v <absolute_path>/webapps:/usr/local/tomcat/webapps -p 8080:8080 shabliad/tomcat. It is possible to map container logs folder to any local folder to be able to read applications logs.
To run some command inside of container docker exec -it --rm shabliad/tomcat bash