{"id":30754280,"url":"https://github.com/twogg-git/ci-teamcity","last_synced_at":"2026-04-12T07:34:46.497Z","repository":{"id":39825473,"uuid":"118506784","full_name":"twogg-git/ci-teamcity","owner":"twogg-git","description":"A setup tutorial to work with Java + TeamCity + Docker ","archived":false,"fork":false,"pushed_at":"2023-03-03T11:38:26.000Z","size":5579,"stargazers_count":0,"open_issues_count":4,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-12T07:34:14.654Z","etag":null,"topics":["docker","maven","teamcity","testing-tools","travis-ci-configuration"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twogg-git.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-01-22T19:49:41.000Z","updated_at":"2020-10-13T03:28:19.000Z","dependencies_parsed_at":"2025-09-04T09:28:20.230Z","dependency_job_id":"9cbea79a-a903-4b31-b0b3-e55f0a173aa0","html_url":"https://github.com/twogg-git/ci-teamcity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/twogg-git/ci-teamcity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twogg-git%2Fci-teamcity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twogg-git%2Fci-teamcity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twogg-git%2Fci-teamcity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twogg-git%2Fci-teamcity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twogg-git","download_url":"https://codeload.github.com/twogg-git/ci-teamcity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twogg-git%2Fci-teamcity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31707953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T06:22:27.080Z","status":"ssl_error","status_checked_at":"2026-04-12T06:21:52.710Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","maven","teamcity","testing-tools","travis-ci-configuration"],"created_at":"2025-09-04T09:07:54.041Z","updated_at":"2026-04-12T07:34:46.469Z","avatar_url":"https://github.com/twogg-git.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![header](imgs/header.png)\n## CI with Java, TeamCity, and Dokcer\n\n[![Build Status](https://travis-ci.org/twogg-git/ci-teamcity.svg?branch=master)](https://travis-ci.org/twogg-git/ci-teamcity)\n\n### Java REST App\nHere is the Docker command to run the java app with a Tomcat 8.0 server. Please take care that we have to use Java 1.7 because of this specifical Tomcat version. I added the .war copy command to deployed automatically. \n```sh\ndocker run --rm -v /your_path/ci-teamcity/target/ci-teamcity.war:/usr/local/tomcat/webapps/ci-teamcity.war -it -p 8585:8080 --name=tomcat tomcat:8.0\n```\n\nIf you need to check the deployment, logs, or setup of Tomcat container use this command:\n```sh\ndocker exec -it tomcat /bin/bash\n```\n\nTest the app going to:\n```sh\nhttp://localhost:8585/ci-teamcity\n```\nI added two more rest services a dummy hello call */ci-teamcity/hello* and a test/id validation */ci-teamcity/test/1*.\n\n### TeamCity Server \nFirst create two folders */data* and */logs* to storage what TC needs. This image will take a while to download (current local size used: 1.52GB).\n```sh\ndocker run -it --name tcserver -v /your_path/teamcity/data:/data/teamcity_server/datadir -v /your_path/teamcity/logs:/opt/teamcity/logs -p 8111:8111 jetbrains/teamcity-server\n```\nI'm using the internal HSQLDB database provided by the image to avoid futher setup, if you have time use an external option!\n\nTo test and start TeamCity go to:\n```sh\nhttp://localhost:8111\n```\n\n### TeamCity Agent \nThere is two version for agents standar and minimal, I used the standard one, you can try with the minimal both will work fine. The standard version is a heavy image to download, so be patient (current local size used: 1.03GB).\n```sh\ndocker run --name tcagent -it -e SERVER_URL=\"your_ip:8111\" -p 9090:9090 -v /your_path/teamcity/agent:/data/teamcity_agent/conf jetbrains/teamcity-agent\n```\nTeamCity Agents will not work with *localhost* as SERVER_URL, so please use your IP. If you need to change your IP or your network connection, don't forget to update the *serverUrl* inside buildAgent.properties then restart the docker.\n```sh\ndocker start tcagent\n```\n\n#### Adding agents to the server\nFor the final step, you have to authorize manually your local agent here:\n```sh\nhttp://localhost:8111/agents.html?tab=unauthorizedAgents\n```\n\n## TeamCity Setup\n\n### Create a new project\nYou can build from an URL, GitHub, Bitbucket, VisualStudioTeam, and a manually configurated repository. Here we are going to use GitHub. You will we asked to connect with your account, then select the repository. It's possible to build the same code in different TeamCity projects, for example master and QA branches. After you select the repository, you need to setup the  build steps. \n\n### Clean-Test\nWith this setup it will being executed the unit test configured in the source and by the configuration in the pom.xml file. I'm using Junit 4.12 version.\n\n![teamcity_setup_step1](imgs/tc_setup_step1.png)\n\n### Package\nAfter being successfully executed the test, we create a .war file to be deployed. \n\n![teamcity_setup_step2](imgs/tc_setup_step2.png)\n\nYou can access the artifact created in the overview page. \n\n![teamcity_artifact](imgs/tc_artifact.png)\n\n### Deploy\nIn the new version of TeamCity is possible to deploy the artifact created or the result of a previous step. Here we are setting up a deploy in a Tomcat container running locally. \n\n![teamcity_setup_step3](imgs/tc_setup_step3.png)\n\n### Local Tomcat container\n\nTo deploy locally, we are going to use the same Tomcat 8.0 image from the beginning, but adding context and user setup. Go to */tomcat* folder and then build the Dockerfile.\n```sh\ndocker build -t twogg/tomcat .\n```\nNow run the container, we are using admin/admin as user and password, and 8787 is going to be our deploy port for TeamCity.\n```sh\ndocker run -d -p 8787:8080 --name tctomcat twogg/tomcat\n```\nTest the new artifact in: \n```sh\nhttp://localhost:8787/ci-teamcity\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwogg-git%2Fci-teamcity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwogg-git%2Fci-teamcity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwogg-git%2Fci-teamcity/lists"}