Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Ubuntu Perforce package #29

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text eol=lf
*.sh text
37 changes: 33 additions & 4 deletions ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ RUN update-alternatives --install /usr/bin/java java ${JAVA_HOME}/bin/java 1 &&
##################################


ARG JDBC_VER=8.0.13

ENV TEAMCITY_DATA_PATH=/data/teamcity_server/datadir \
TEAMCITY_DIST=/opt/teamcity \
TEAMCITY_LOGS=/opt/teamcity/logs \
Expand All @@ -44,9 +46,36 @@ EXPOSE 8111
LABEL dockerImage.teamcity.version="latest" \
dockerImage.teamcity.buildNumber="latest"

RUN apt-get update && \
apt-get install -y git mercurial ca-certificates && \
apt-get clean all
RUN buildDeps=' \
gnupg \
' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& curl -fsSL https://package.perforce.com/perforce.pubkey | apt-key add - \
&& mkdir -p /etc/apt/sources.list.d \
&& ( \
. /etc/os-release && \
echo "deb http://package.perforce.com/apt/$ID $VERSION_CODENAME release" \
> /etc/apt/sources.list.d/perforce.list \
) \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
git \
helix-cli \
mercurial \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf /var/lib/apt/lists/*

# Restore this if the libmysql-java package is updated
#RUN mkdir -p $TEAMCITY_DATA_PATH/lib/jdbc && \
# ln -s /usr/share/java/mysql.jar $TEAMCITY_DATA_PATH/lib/jdbc/mysql-connector-java-bin.jar

RUN mkdir mysql_java_tmp && \
curl -L https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-$JDBC_VER.tar.gz --output mysql_java_tmp/mysql.tar.gz && \
mkdir -p $TEAMCITY_DATA_PATH/lib/jdbc && \
tar -vxzf mysql_java_tmp/mysql.tar.gz -C $TEAMCITY_DATA_PATH/lib/jdbc/ --wildcards "mysql-connector-java-*/mysql-connector-java-*.jar" --strip-components 1 && \
rm -rf mysql_java_tmp

COPY welcome.sh /welcome.sh
COPY run-server.sh /run-server.sh
Expand All @@ -65,4 +94,4 @@ VOLUME $TEAMCITY_DATA_PATH \
$TEAMCITY_LOGS \
$TEAMCITY_TEMP

CMD ["/run-services.sh"]
CMD ["/run-services.sh"]