Public | Automated Build

Last pushed: 10 months ago
Short Description
JetBrains TeamCity continuous integration server
Full Description

TeamCity is a continuous integration server from JetBrains.

How to use the image

It is recommended to use a data container to persist the application data:

docker run --name teamcity-data \
  -v /var/lib/teamcity -v /var/lib/postgresql/data \
  busybox chown -R 999: /var/lib/teamcity /var/lib/postgresql/data

If you're not planning to use an external database, just omit the Postgres volume.

However it is strongly recommended to use an external database on production installations. You can start a Postgres container for a dedicated external DB:

docker run --name teamcity-db -d \
  -e POSTGRES_USER=teamcity -e POSTGRES_PASSWORD=somepass \
  --volumes-from teamcity-data postgres

Now run the TeamCity container:

docker run -d --name teamcity --volumes-from teamcity-data \
  --link teamcity-db:teamcity-db -p 8111:8111 klikatech/teamcity

If you didn't start the Postgres container on the previous step, simply omit the --link argument.

In order to run build jobs you need to start at least one build agent. See teamcity-agent-base image for details.

Staying up to date

In order to update the TeamCity installation to latest version you need to stop the container, pull the latest version of the image and start a new container:

docker stop teamcity
docker rm teamcity
docker run -d --name teamcity --volumes-from teamcity-data \
  --link teamcity-db:teamcity-db -p 8111:8111 klikatech/teamcity
Docker Pull Command
Owner
klikatech
Source Repository

Comments (2)
evolchek
2 years ago

fixed

vasilevich
2 years ago

teamcity-data:
container_name: teamcity-data
image: busybox
volumes:

- /var/lib/teamcity
- /var/lib/postgresql/data

command: chmod 777 -R /var/lib/teamcity
entrypoint: /bin/true

teamcity-db:
container_name: teamcity-db
image: postgres
volumes_from:

- teamcity-data

expose:

- 5432

environment:

- POSTGRES_USER=teamcity
- POSTGRES_PASSWORD=********

restart: always

teamcity:
container_name: teamcity
image: klikatech/teamcity
hostname: teamcity
volumes_from:

- teamcity-data

ports:

- 8111:8111

links:

- teamcity-db:teamcity-db

restart: always

Error: attempt to create TeamCity Data Directory "/var/lib/teamcity/.BuildServer" has failed. Check the directory can be created by the user TeamCity runs under.