https://github.com/jonmosco/tomcat_sidecar_pattern
Tomcat with a war deployer sidecar container pattern example
https://github.com/jonmosco/tomcat_sidecar_pattern
Last synced: 24 days ago
JSON representation
Tomcat with a war deployer sidecar container pattern example
- Host: GitHub
- URL: https://github.com/jonmosco/tomcat_sidecar_pattern
- Owner: jonmosco
- Created: 2017-02-11T22:09:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-15T02:40:46.000Z (over 9 years ago)
- Last Synced: 2025-01-17T17:54:24.762Z (over 1 year ago)
- Language: Shell
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##Tomcat application deployment container
###This is a POC that puts the sidecar container pattern to use
Deploys the sample.war from a container to a mounted VOLUME exposed
inside the tomcat container in /usr/local/tomcat/webapps/
##Sidecar Container Pattern
https://www.usenix.org/system/files/conference/hotcloud16/hotcloud16_burns.pdf
###Vagrant environment
This image can run locally as long as the docker engine is isntalled, and
comes with Vagrantfile VM on CentOS 7 with the latest Docker engine.
###Server Container
```docker
FROM tomcat:8.0-jre8
# Mount point for the sidecar container
VOLUME [ "/usr/local/tomcat/webapps" ]
```
###Side Container
```docker
FROM busybox:latest
ADD sample.war /usr/local/tomcat/webapps/sample.war
VOLUME [ "/usr/local/tomcat/webapps/" ]
WORKDIR /usr/local/tomcat/webapps/
```
Build the image:
$ docker buid sidecar/
Run the container:
```
$ docker run -t -i --name sidecar_test sidecar_war
```
Keep the container running:
```
$ docker run -d --name sidecar_test03 sidecar_war tail -f /dev/null
```
Build the stack:
```
$ docker run --name sample_app05 --volumes-from sidecar_test -d -p 8080:8080 tomcat_server0
```
###Docker Compose
This example app deployment also includes a docker-compose.yml