-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-teamcity
26 lines (21 loc) · 914 Bytes
/
Dockerfile-teamcity
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM openjdk:latest
MAINTAINER Piotr Joński <p.jonski@pojo.pl>
ARG TEAMCITY_VERSION=10.0.4
ARG USER_ID=2000
ARG USER_NAME=jetbrains
ENV PORT=8080
RUN groupadd --gid ${USER_ID} ${USER_NAME} && \
useradd --create-home --home-dir /teamcity --uid ${USER_ID} --gid ${USER_NAME} ${USER_NAME} && \
chown --changes ${USER_NAME}:${USER_NAME} /teamcity
USER ${USER_NAME}
WORKDIR /teamcity
RUN mkdir backups data logs conf temp && \
curl --location "https://download.jetbrains.com/teamcity/TeamCity-${TEAMCITY_VERSION}.tar.gz" > teamcity.tar.gz && \
tar -xf teamcity.tar.gz && \
rm -f teamcity.tar.gz && \
mv TeamCity/* . && \
mkdir -p /teamcity/data/lib/jdbc && \
curl --location "https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar" > data/lib/jdbc/postgresql-9.4.1212.jar && \
rm -rf TeamCity
EXPOSE ${PORT}
CMD [ "/bin/bash", "/teamcity/bin/teamcity-server.sh", "run" ]