{"id":23729602,"url":"https://github.com/azure/tomcat-container-quickstart","last_synced_at":"2025-09-04T05:31:43.781Z","repository":{"id":54380666,"uuid":"234216413","full_name":"Azure/tomcat-container-quickstart","owner":"Azure","description":"Quick starts for creating Tomcat app server container images -- using supported versions of Java and and customizing the images","archived":false,"fork":false,"pushed_at":"2022-06-20T20:28:21.000Z","size":81314,"stargazers_count":6,"open_issues_count":1,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-31T02:16:56.420Z","etag":null,"topics":["aci","acr","aks","aks-kubernetes-cluster","apache","azure-container-instances","azure-container-registry","docker","java","kubernetes","migration","tomcat"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2020-01-16T02:22:00.000Z","updated_at":"2024-01-13T06:59:26.000Z","dependencies_parsed_at":"2022-08-13T14:00:37.702Z","dependency_job_id":null,"html_url":"https://github.com/Azure/tomcat-container-quickstart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Ftomcat-container-quickstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Ftomcat-container-quickstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Ftomcat-container-quickstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure%2Ftomcat-container-quickstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure","download_url":"https://codeload.github.com/Azure/tomcat-container-quickstart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231933258,"owners_count":18448063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aci","acr","aks","aks-kubernetes-cluster","apache","azure-container-instances","azure-container-registry","docker","java","kubernetes","migration","tomcat"],"created_at":"2024-12-31T02:17:08.615Z","updated_at":"2024-12-31T02:17:10.471Z","avatar_url":"https://github.com/Azure.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tomcat on Containers QuickStart\r\n\r\nThis repository contains artifacts to help you get started running Tomcat applications on Azure container platforms, such as the Azure Kubernetes Service (AKS). It is intended to accompany the [Tomcat to AKS Migration guide](https://docs.microsoft.com/azure/java/migrate-tomcat-to-containers-on-azure-kubernetes-service).\r\n\r\n## Getting started\r\n\r\nWe provide a WAR build of [Spring Pet Clinic](https://github.com/spring-petclinic/spring-framework-petclinic) in ROOT.war as a sample application. By following the steps below, you can see this QuickStart in action without the need to provide your own applciation or to make any modifications.\r\n\r\n### Pre-requisites\r\n\r\nFor running locally:\r\n\r\n* [Docker CLI](https://docs.docker.com/install/)\r\n\r\nFor running on Azure:\r\n\r\n* [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli)\r\n* [An Azure subscription](https://azure.microsoft.com/free/).\r\n\r\n### Building and testing locally\r\n\r\nIf you have Docker CLI installed locally, you can run this QuickStart on your machine:\r\n\r\n1. Clone the repository and navigate into the root of the repository:\r\n\r\n    ```bash\r\n    git clone https://github.com/Azure/tomcat-container-quickstart.git\r\n    cd tomcat-container-quickstart\r\n    ```\r\n\r\n1. Build the docker image:\r\n\r\n    ```bash\r\n    docker build . -t tomcat\r\n    ```\r\n\r\n1. Run the image:\r\n\r\n    ```bash\r\n    docker run -p8080:8080 -d tomcat\r\n    ```\r\n\r\n    Once the container is running, navigate to `http://localhost:8080` in [your favorite browser](https://www.microsoft.com/edge). You should see the Petclinic application come up.\r\n\r\n### Building and testing on Azure\r\n\r\nAlternatively, you can build and test the image entirely on Azure. These steps can be performed from [Azure CloudShell](https://shell.azure.com) or from any machine with [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli) installed.\r\n\r\n1. [Create an Azure Container Registry](https://portal.azure.com/#create/Microsoft.ContainerRegistry). Be sure to enable the admin user.\r\n\r\n1. Clone the repository and navigate into the root of the repository:\r\n\r\n```bash\r\n    git clone https://github.com/Azure/tomcat-container-quickstart.git\r\n    cd tomcat-container-quickstart\r\n```\r\n\r\n1. Once the Azure Container Registry instance is created, run the following command, where `${REGISTRY_NAME}` is the name of the Azure Container Registry you just created:\r\n\r\n    ```bash\r\n    az acr build -r ${REGISTRY_NAME} -t \"${REGISTRY_NAME}.azurecr.io/tomcat\" .\r\n    ```\r\n\r\n    The Azure Container Registry will now build the docker image on its own server.\r\n\r\n1. Once the image build has completed, run the following command. It will deploy the image onto an Azure Container Instance. `${RESOURCE_GROUP}` should be the name of a resource group in your azure subscription. `${REGISTRY_NAME}` should be the same as above\r\n\r\n    ```bash\r\n    az container create -g ${RESOURCE_GROUP} -n ${REGISTRY_NAME} \\\r\n      --image \"${REGISTRY_NAME}.azurecr.io/tomcat\"  \\\r\n      --registry-password \"$(az acr credential show -n $REGISTRY_NAME --query \"passwords[0].value\" -o tsv)\" \\\r\n      --registry-username \"${REGISTRY_NAME}\" \\\r\n      --ip-address Public \\\r\n      --ports 8080 \\\r\n      --query \"ipAddress.ip\"\r\n    ```\r\n\r\n    When the command completes, it will display an IP address. Navigate to `http://\u003cThe IP Address\u003e:8080` in your browser, and you should see the home page of the deployed web application.\r\n\r\n    To terminate the container instance, run\r\n\r\n    ```bash\r\n    az container delete -g ${RESOURCE_GROUP} -n ${REGISTRY_NAME} --yes\r\n    ```\r\n\r\n## Contributing\r\n\r\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\r\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\r\nthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.\r\n\r\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\r\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\r\nprovided by the bot. You will only need to do this once across all repos using our CLA.\r\n\r\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\r\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\r\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Ftomcat-container-quickstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazure%2Ftomcat-container-quickstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazure%2Ftomcat-container-quickstart/lists"}