I am using below packer.json file to put war file into tomcat container & build it
{
“builders”: [{
“type”: “docker”,
“image”: “tomcat:8.0”,
“commit”: “true”
}],
“provisioners”: [
{
“type”: “file”,
“source”: “sample.war”,
“destination”: “/usr/local/tomcat/webapps/”
}
],
“post-processors”: [
[
{
“type”: “docker-tag”,
“repository”: “satwikmukherjee/runner-poc”,
“tag”: “{{timestamp}}”
},
{
“type”: “docker-push”,
“login”: “true”,
“login_username”: “####”,
“login_password”: “####”
}
]
]
}
After building while I am running the image committed , within container I am seeing tomcat is not running ,
But while I am doing the same stuff through Dockerfile , no issue found , Dockerfile used as below with the same logic .
FROM tomcat:8.0
COPY sample.war /usr/local/tomcat/webapps/
Please let me know if I am doing anything wrong …
Regards,
Satwik