Skip to content

Commit

Permalink
add files to submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
shkate committed Sep 29, 2016
0 parents commit 72ad5f7
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.bak
README.md
.git
.idea
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM teamcity-base:latest
MAINTAINER Kateryna Shlyakhovetska <[email protected]>

ENV TEAMCITY_DATA_PATH=/data/teamcity_server/datadir \
TEAMCITY_DIST=/opt/teamcity \
TEAMCITY_LOGS=/opt/teamcity/logs

EXPOSE 8111
LABEL dockerImage.teamcity.version="latest" \
dockerImage.teamcity.buildNumber="latest"

COPY run-services.sh /run-services.sh
RUN chmod +x /run-services.sh
COPY dist/teamcity $TEAMCITY_DIST

VOLUME $TEAMCITY_DATA_PATH \
$TEAMCITY_LOGS

CMD ["/run-services.sh"]
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## TeamCity Server Image Dockerfile

This project contains Dockerfile and all necessary scripts to build Docker image and run TeamCity server inside the container.

Ready-to-use image you can pull from Docker Hub Repository

```docker pull jetbrains/teamcity-server```

If you need to build your own image you need to perform the following action

1. Pull our base image and re-tag it
```
docker pull jetbrains/teamcity-base
docker tag jetbrains/teamcity-base teamcity-base
```
2. Extract TeamCity.tar.gz of any version you like to use into folder ```dist/teamcity``` folder. In the same directory where Dockerfile is place run
```
mkdir dist
tar zxf TeamCity-<version>.tar.gz -C dist/
mv dist/TeamCity dist/teamcity
```

3. Run ```docker build``` command
```
docker build -t teamcity-server .
```


See our detailed instruction on Docker Hub Repository how to use the image.
11 changes: 11 additions & 0 deletions run-services.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

shutdown() {
${TEAMCITY_DIST}/bin/teamcity-server.sh stop
}

rm -f ${TEAMCITY_LOGS}/*.pid

trap 'shutdown' SIGTERM SIGINT SIGHUP

/bin/bash -c "${TEAMCITY_DIST}/bin/teamcity-server.sh run"

0 comments on commit 72ad5f7

Please sign in to comment.