Closed rubenwardy closed 6 years ago
Hi,
I'll try answering your first question - TeamCity has a number of features when docker is used in your builds. There are "docker build" and "docker compose" build runners + you can specify command line runner to run your script inside docker container from the specified docker image.
Some documentation on these features are here: https://confluence.jetbrains.com/display/TCD18/Integrating+TeamCity+with+Docker
Hope this makes sense,
Thanks, will look though.
Forgot to mention a third question, how do I install systemd in my teamcity-base? Would be good to have an example teamcity-base/Dockerfile
I'll try to answer other questions.
docker.sock
into running agent to be able to use docker-related features in TeamCity.Closing as I've solved this issue for myself. I removed systemd and docker from the container.
teamcity-agent/Dockerfile:
FROM teamcity-minimal-agent
MAINTAINER Vladislav Rassokhin <vladislav.rassokhin@jetbrains.com>
LABEL dockerImage.teamcity.version="latest" \
dockerImage.teamcity.buildNumber="latest"
ENV NUGET_XMLDOC_MODE=skip \
DOTNET_CLI_TELEMETRY_OPTOUT=true \
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true \
GIT_SSH_VARIANT=ssh
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:openjdk-r/ppa && add-apt-repository -y ppa:git-core/ppa && apt-get update && \
apt-get install -y git mercurial openjdk-8-jdk apt-transport-https ca-certificates curl && \
\
wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7ubuntu0.4_amd64.deb && \
apt install ./libicu55_55.1-7ubuntu0.4_amd64.deb && \
apt-get install -y --no-install-recommends \
libc6 \
libgcc1 \
libgssapi-krb5-2 \
liblttng-ust0 \
libssl1.0.0 \
libstdc++6 \
libunwind8 \
libuuid1 \
zlib1g \
&& rm -rf /var/lib/apt/lists/* && \
\
curl -SL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/2.1.4/dotnet-sdk-2.1.4-linux-x64.tar.gz --output dotnet.tar.gz \
&& mkdir -p /usr/share/dotnet \
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \
&& rm dotnet.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet && \
\
mkdir warmup \
&& cd warmup \
&& dotnet new \
&& cd .. \
&& rm -rf warmup \
&& rm -rf /tmp/NuGetScratch && \
\
apt-get clean all
run-docker.sh:
#!/bin/bash
if [ "$DOCKER_IN_DOCKER" = "start" ] ; then
echo "Ignoring docker start request"
fi
Hope this helps someone
Hi! I'd like to run a teamcity agent based on Ubuntu 18.04. I cloned each of teamcity-minimal-agent and this repo, move ubuntu/Dockerfile to the root of each repo and delete all other dirs, then updated the dockerfile to use biomic and such.
Building this repo's image failed, as systemd was not installed in the image. Systemd should not be used in docker anyway, as the whole point is you run the app as the init process - it's a container not a VM.
Additionally, this appears to be for using docker inside a docker container??? From what I can tell, this is never actually used in my CI and I'm not even sure how it's supposed to be used.
So, questions:
teamcity-base/Dockerfile:
teamcity-minimal-agent/Dockerfile:
teamcity-agent/Dockerfile: