2020-01-29 14:52:30 +03:00
|
|
|
FROM epicmorg/devel:jdk8
|
2019-09-18 19:33:04 +03:00
|
|
|
LABEL maintainer="EpicMorg DevTeam, developer@epicm.org"
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2019-09-14 22:28:02 +03:00
|
|
|
|
|
|
|
##################################################################
|
|
|
|
# teamcity minimal agent
|
|
|
|
##################################################################
|
|
|
|
VOLUME /data/teamcity_agent/conf
|
|
|
|
|
|
|
|
ENV CONFIG_FILE=/data/teamcity_agent/conf/buildAgent.properties \
|
|
|
|
LANG=C.UTF-8
|
|
|
|
|
|
|
|
LABEL dockerImage.teamcity.version="latest" \
|
|
|
|
dockerImage.teamcity.buildNumber="latest"
|
|
|
|
|
|
|
|
COPY run-agent.sh /run-agent.sh
|
|
|
|
COPY run-services.sh /run-services.sh
|
2019-09-18 19:33:04 +03:00
|
|
|
|
2019-09-14 22:28:02 +03:00
|
|
|
ADD https://teamcity.jetbrains.com/update/buildAgent.zip /buildAgent.zip
|
|
|
|
|
2019-09-18 19:33:04 +03:00
|
|
|
RUN unzip /buildAgent.zip -d /opt/buildagent && \
|
|
|
|
mv /opt/buildagent/conf /opt/buildagent/conf_dist && \
|
|
|
|
rm -rfv /buildAgent.zip
|
2019-09-14 22:28:02 +03:00
|
|
|
|
2019-09-18 19:33:04 +03:00
|
|
|
RUN useradd -m buildagent && \
|
2019-09-14 22:28:02 +03:00
|
|
|
chmod +x /opt/buildagent/bin/*.sh && \
|
|
|
|
chmod +x /run-agent.sh /run-services.sh && sync
|
|
|
|
|
|
|
|
##################################################################
|
|
|
|
# teamcity main agent
|
|
|
|
##################################################################
|
|
|
|
|
|
|
|
# Opt out of the telemetry feature
|
|
|
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT=true \
|
|
|
|
# Disable first time experience
|
|
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true \
|
|
|
|
# Configure Kestrel web server to bind to port 80 when present
|
|
|
|
ASPNETCORE_URLS=http://+:80 \
|
|
|
|
# Enable detection of running in a container
|
|
|
|
DOTNET_RUNNING_IN_CONTAINER=true \
|
|
|
|
# Enable correct mode for dotnet watch (only mode supported in a container)
|
|
|
|
DOTNET_USE_POLLING_FILE_WATCHER=true \
|
|
|
|
# Skip extraction of XML docs - generally not useful within an image/container - helps perfomance
|
|
|
|
NUGET_XMLDOC_MODE=skip \
|
|
|
|
GIT_SSH_VARIANT=ssh \
|
|
|
|
# Install .NET Core SDK
|
2020-01-15 12:53:31 +03:00
|
|
|
DOTNET_SDK_VERSION=3.1.101 \
|
2019-09-14 22:28:02 +03:00
|
|
|
#unofficial support of openssl1.1 instead of 1.0 [https://stackoverflow.com/questions/51901359]
|
|
|
|
CLR_OPENSSL_VERSION_OVERRIDE=45
|
|
|
|
|
|
|
|
# docker insall
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y git mercurial apt-transport-https ca-certificates software-properties-common && \
|
|
|
|
\
|
|
|
|
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
|
2020-01-29 15:38:40 +03:00
|
|
|
curl -fsSL https://packages.atlassian.com/api/gpg/key/public | apt-key add - && \
|
|
|
|
echo 'deb https://download.docker.com/linux/debian buster test' > /etc/apt/sources.list.d/docker.list && \
|
|
|
|
echo 'deb https://packages.atlassian.com/debian/atlassian-sdk-deb/ stable contrib' > /etc/apt/sources.list.d/atlassian-sdk.list && \
|
2019-09-14 22:28:02 +03:00
|
|
|
apt-cache policy docker-ce && \
|
|
|
|
apt-get update && apt-get install -y --allow-unauthenticated docker-ce docker-ce-cli containerd.io systemd && \
|
|
|
|
systemctl disable docker && \
|
|
|
|
curl -SL https://github.com/docker/compose/releases/download/1.24.1/docker-compose-Linux-x86_64 -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose && \
|
|
|
|
\
|
|
|
|
apt-get install -y --no-install-recommends \
|
2020-01-29 15:38:40 +03:00
|
|
|
iptables \
|
2019-09-14 22:28:02 +03:00
|
|
|
fontconfig \
|
|
|
|
libc6 \
|
|
|
|
libgcc1 \
|
|
|
|
libgssapi-krb5-2 \
|
|
|
|
libicu63 \
|
|
|
|
liblttng-ust0 \
|
|
|
|
libssl1.1 \
|
|
|
|
libstdc++6 \
|
|
|
|
zlib1g \
|
2020-01-29 15:38:40 +03:00
|
|
|
atlassian-plugin-sdk \
|
2019-09-14 22:28:02 +03:00
|
|
|
&& rm -rf /var/lib/apt/lists/* && \
|
|
|
|
\
|
2020-01-15 12:53:31 +03:00
|
|
|
curl -SL https://download.visualstudio.microsoft.com/download/pr/c4b503d6-2f41-4908-b634-270a0a1dcfca/c5a20e42868a48a2cd1ae27cf038044c/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz --output dotnet.tar.gz \
|
2019-09-14 22:28:02 +03:00
|
|
|
&& mkdir -p /usr/share/dotnet \
|
|
|
|
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \
|
|
|
|
&& rm dotnet.tar.gz \
|
|
|
|
&& find /usr/share/dotnet -name "*.lzma" -type f -delete \
|
|
|
|
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet && \
|
|
|
|
\
|
|
|
|
apt-get clean all && \
|
|
|
|
\
|
|
|
|
usermod -aG docker buildagent
|
|
|
|
|
|
|
|
# A better fix for TW-52939 Dockerfile build fails because of aufs
|
|
|
|
VOLUME /var/lib/docker
|
|
|
|
|
|
|
|
COPY run-docker.sh /services/run-docker.sh
|
|
|
|
RUN chmod +x /services/run-docker.sh && sync
|
|
|
|
|
|
|
|
# Trigger .NET CLI first run experience by running arbitrary cmd to populate local package cache
|
|
|
|
RUN ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0 && \
|
|
|
|
ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libssl.so.1.0 && \
|
|
|
|
dotnet help
|
|
|
|
|
|
|
|
|
2019-12-13 12:55:54 +03:00
|
|
|
##################################################################
|
|
|
|
# Installing PHP7
|
|
|
|
##################################################################
|
|
|
|
#installing php repo
|
|
|
|
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
|
|
|
|
RUN sh -c 'echo "deb https://packages.sury.org/php/ buster main" > /etc/apt/sources.list.d/php.list'
|
|
|
|
|
|
|
|
#Install base packages
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y --allow-unauthenticated \
|
|
|
|
php7.3-gmp \
|
|
|
|
php7.3-snmp \
|
|
|
|
php7.3-ldap \
|
|
|
|
php7.3-dev \
|
|
|
|
php7.3 \
|
|
|
|
php7.3-mail \
|
|
|
|
php7.3-mailparse \
|
|
|
|
php7.3-soap \
|
|
|
|
php7.3-mysql \
|
|
|
|
php7.3-memcached \
|
|
|
|
php7.3-memcache \
|
|
|
|
php7.3-igbinary \
|
|
|
|
php7.3-curl \
|
|
|
|
php7.3-gd \
|
|
|
|
php7.3-intl \
|
|
|
|
php7.3-zip \
|
|
|
|
php7.3-bcmath \
|
|
|
|
php7.3-fpm \
|
|
|
|
php-pear \
|
|
|
|
php7.3-imap \
|
|
|
|
php7.3-pspell \
|
|
|
|
php7.3-recode \
|
|
|
|
php7.3-sqlite3 \
|
|
|
|
php7.3-tidy \
|
|
|
|
php7.3-xmlrpc \
|
|
|
|
php7.3-xml \
|
|
|
|
php7.3-mbstring \
|
|
|
|
php7.3-gettext \
|
|
|
|
php7.3-apcu \
|
|
|
|
php7.3-cli \
|
|
|
|
php7.3-common \
|
|
|
|
php7.3-cgi \
|
|
|
|
php7.3-json \
|
|
|
|
php7.3-readline \
|
|
|
|
php7.3-enchant \
|
|
|
|
php7.3-ssh2 \
|
|
|
|
php7.3-oauth \
|
|
|
|
php7.3-gmagick \
|
|
|
|
php7.3-gnupg \
|
|
|
|
php7.3-redis \
|
|
|
|
php7.3-smbclient \
|
|
|
|
php7.3-yaml \
|
|
|
|
php7.3-geoip \
|
|
|
|
sendmail && \
|
|
|
|
phpenmod \
|
|
|
|
snmp \
|
|
|
|
gmp \
|
|
|
|
calendar \
|
|
|
|
ldap \
|
|
|
|
curl \
|
|
|
|
exif \
|
|
|
|
ftp \
|
|
|
|
fileinfo \
|
|
|
|
gd \
|
|
|
|
geoip \
|
|
|
|
gettext \
|
|
|
|
gnupg \
|
|
|
|
iconv \
|
|
|
|
imap \
|
|
|
|
json \
|
|
|
|
mbstring \
|
|
|
|
memcached \
|
|
|
|
mysqli \
|
|
|
|
mysqlnd \
|
|
|
|
oauth \
|
|
|
|
pdo_mysql \
|
|
|
|
pdo_sqlite \
|
|
|
|
phar \
|
|
|
|
posix \
|
|
|
|
readline \
|
|
|
|
redis \
|
|
|
|
simplexml \
|
|
|
|
sockets \
|
|
|
|
sqlite3 \
|
|
|
|
ssh2 \
|
|
|
|
tokenizer \
|
|
|
|
xml \
|
|
|
|
xmlreader \
|
|
|
|
xmlrpc \
|
|
|
|
xmlwriter \
|
|
|
|
xsl \
|
|
|
|
yaml && \
|
2020-01-15 12:53:31 +03:00
|
|
|
ln -sf /etc/ssl/dhparam.pem /etc/php/dhparam.pem && \
|
2019-12-13 12:55:54 +03:00
|
|
|
php -v
|
|
|
|
|
|
|
|
##################################################################
|
|
|
|
# Installing Composer addon
|
|
|
|
##################################################################
|
|
|
|
RUN cd /tmp && \
|
2020-01-28 15:27:43 +03:00
|
|
|
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
|
|
|
|
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
|
|
|
|
rm /tmp/composer-setup.php
|
2019-12-13 12:55:54 +03:00
|
|
|
|
2020-01-28 15:27:43 +03:00
|
|
|
##################################################################
|
|
|
|
# Node.js 12.x
|
|
|
|
##################################################################
|
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
|
|
|
|
apt-get install -y nodejs
|
2019-12-13 12:55:54 +03:00
|
|
|
|
2020-01-29 15:56:50 +03:00
|
|
|
##################################################################
|
|
|
|
# steam runtime and ssdk
|
|
|
|
##################################################################
|
|
|
|
RUN cd / && \
|
|
|
|
sudo mkdir valve && \
|
|
|
|
cd valve && \
|
|
|
|
sudo wget http://media.steampowered.com/client/runtime/steam-runtime-sdk_latest.tar.xz && \
|
|
|
|
sudo tar xvf steam-runtime-sdk_latest.tar.xz && \
|
|
|
|
sudo mv steam-runtime-sdk_2013-09-05 steam-runtime && \
|
|
|
|
sudo chown root:root * -R && \
|
|
|
|
cd steam-runtime && \
|
|
|
|
printf '%s\n' 3 1 Y Y Y | ./setup.sh
|
|
|
|
|
2019-09-14 22:28:02 +03:00
|
|
|
##################################################################
|
2019-09-18 19:33:04 +03:00
|
|
|
# cleaninig up
|
2019-09-14 22:28:02 +03:00
|
|
|
##################################################################
|
2019-09-23 16:31:14 +03:00
|
|
|
RUN apt clean -y && \
|
|
|
|
apt autoclean -y && \
|
|
|
|
rm -rfv /var/lib/apt/lists/* && \
|
2019-12-13 12:55:54 +03:00
|
|
|
rm -rfv /var/cache/apt/archives/*.deb && \
|
|
|
|
rm -rfv /tmp/deb/* && \
|
|
|
|
rm -rfv /tmp/composer-setup.php
|
2019-09-14 22:28:02 +03:00
|
|
|
|
|
|
|
CMD ["/run-services.sh"]
|
|
|
|
|
|
|
|
EXPOSE 9090
|