jetbrains / teamcity-docker-agent Goto Github PK
View Code? Open in Web Editor NEWTeamCity agent docker image sources
Home Page: https://hub.docker.com/r/jetbrains/teamcity-agent/
License: Apache License 2.0
TeamCity agent docker image sources
Home Page: https://hub.docker.com/r/jetbrains/teamcity-agent/
License: Apache License 2.0
I suspect that this is a Windows Containers problem, not a TeamCity problem, but I'm also logging it here as it may affect fellow users. I have had to abandon using containerized build agents and revert to using VMs.
When running a build via the agent running within the container, at some arbitrary point, the container becomes unresponsive. With process isolation, RDP to the host OS also becomes unresponsive and the host eventually reboots. With hyperv isolation, the container becomes unresponsive and then stops, but the host OS stays up and responsive. Builds do sometimes complete, but more often than not they fail. TeamCity server reports a loss of connection to the build agent, and eventually the build is marked as failed.
The original issue is logged here, with a bit more detail:
docker/for-win#426 (comment)
Im having an issue building within containers on the agent. First symptoms was that restoring nuget packages in a dotnet restore
would time out for each individual package.
I tested this ok directly on the docker agent, but it would consistently fail restoring in the container running on the agent.
Playing around with curl in the container running on the agent i got inconsistent results, it returned the header and partial html, eventually timing out.
After a suggestion from a co-worker we attempted to reduce MTU to 1380 (magic number he suggested) for the docker_ops
on the teamcity agent, and it seems to have solved the problem.
Now i mount a /etc/docker/daemon.json in order to set mtu. Looks like this:
{ "mtu":1380 }
Is this something that could be adjusted in the official image? (I do wonder why i'm the only one that seems to have this issue)
Publishing artifacts from the agent to the TeamCity Server fails.
Error:
[13:40:51] Publishing artifacts (running for 21m:15s)
[13:40:51] [Publishing artifacts] Collecting files to publish: [C:\BuildAgent\temp\buildTmp\coverage8038980754777348497zip\CoverageReport.xml=>.teamcity/.NETCoverage]
[13:40:54] [Publishing artifacts] Publishing 1 file using [WebPublisher]: C:/BuildAgent/temp/buildTmp/coverage8038980754777348497zip/CoverageReport.xml => .teamcity/.NETCoverage
[13:40:55] [Publishing artifacts] Publishing 1 file using [ArtifactsCachePublisher]: C:/BuildAgent/temp/buildTmp/coverage8038980754777348497zip/CoverageReport.xml => .teamcity/.NETCoverage
[13:42:10] [Publishing artifacts] Recoverable problem publishing artifacts (will retry): Connection reset by peer: socket write error
I'm using teamcity for running automated specflow tests in build agent,
I saw that runner type - Docker and Docker Compose.
Can we run tests on containers in build agent by installing Docker in teamcity build agent.
How to run the same tests in docker container in teamcity.
Any option available in teamcity? please advice?
Thanks!
That is what I tried according to the guide on https://hub.docker.com/r/jetbrains/teamcity-agent/
docker run -itd --name teamcity-win-agent -e SERVER_URL="<IP>:80" -v/etc/teamcity/agent_win/conf:/data/teamcity_agent/conf jetbrains/teamcity-agent:windowsservercore
the errors were:
Unable to find image 'jetbrains/teamcity-agent:windowsservercore' locally
docker: Error response from daemon: manifest for jetbrains/teamcity-agent:windowsservercore not found.
Can anybody tell me how to get this done? I am kinda unsure if I fully understood how the windows agent is started.
I run the container of a debian environment - no windows container
The following teamcity agent:
teamcity-agent-stuff:
image: jetbrains/teamcity-agent:latest
restart: always
environment:
- "SERVER_URL=http://something:8111"
- "DOCKER_IN_DOCKER=start"
- "AGENT_NAME=stuff"
volumes:
- teamcity-agent-stuff:/data/teamcity_agent/conf
networks:
- teamcity-network
# Adds docker in docker support
privileged: true
Still fails when trying a Docker Build step.
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?). Using system default: https://index.docker.io/v1/ Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Hey guys
Do you think it would be possible for you to distribute an image based on the agent image but with node and react tooling above it?
Thanks
Phil
Is it possible to set proxy settings for the docker-in-docker daemon when starting the agent?
For example when I run the agent:
docker run --rm -it -e SERVER_URL="<server>" -e AGENT_NAME="<agent>" -e GIT_SSL_NO_VERIFY=1 -v agent:/data/teamcity_agent/conf --privileged -e DOCKER_IN_DOCKER="start" jetbrains/teamcity-agent
I have to bash in:
docker exec -i -t <container id> /bin/bash
And then add the proxies to /etc/default/docker:
echo "export http_proxy=http://proxy:port" >> /etc/default/docker
echo "export https_proxy=http://proxy:port" >> /etc/default/docker
And finally restart the service:
service docker restart
If I don't do this, when building images I get:
[03:25:58][Step 2/3] docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
I found git-lfs missing on jetbrains/teamcity-agent:latest-nanoserver
Kind regards
Konstantin
Error running executables using Powershell.
Try running nuget restore in Powershell:
[<<==>>] Exception: The Win32 internal error "No process is on the other end of the pipe" 0xE9 occurred while setting the console window title. Contact Microsoft Customer Support Services. --> No process is on the other end of the pipe
I'm evaluating the docker agent image. We have the symbol server feature enabled on the TC server. I'm getting build errors when using the docker agent:
.NET 3.5 runtime required for symbols indexing was not found on build agent.
Failed to find Source Server tools home directory. No symbol and source indexing will be performed.
Is there a reason that the docker image does not contain the required components? Could you add them? And how can I add them myself in the mean time?
The documentation does not specifically cover use with the docker image.
I'm using jetbrains/teamcity-agent:2018.1.1-windowsservercore-1803
When the code contains Excel generate, the build will fail with following error message:
I guess it's because the package fontconfig
is missing in the ubuntu.
I work with this script to install fontconfig and resolved the problem, so I strongly suggest to add the following command into the container based ubuntu.
docker exec -it {{agentContainerId}} bash
apt-get install -y fontconfig
Here is the link I get solutions from: adoptium/temurin-build#693
I am trying to run a docker build in an agent within the container. The docker file of my project pulls from an insecure docker registry. I have tried setting the insecure registry in the docker_opts environment variable, but am still getting the error. Hoping someone can guide me in the right direction
Here is my docker run command.
docker run -it -e SERVER_URL="http://buildtest:880" --privileged -e DOCKER_OPTS="--insecure-registry 10.0.4.89:2113" -e DOCKER_IN_DOCKER=start -e AGENT_NAME="Docker-TeamCity" -v :/data/teamcity_agent/conf jetbrains/teamcity-agent
The agent starts and connects to our agent perfectly, but I get the classic insecure registry error 'http response to an https client' I have execed into the machine and dont see a daemon.json file. Not sure if I should just mount the file, or if that would even work. Any help is appreciated.
When trying to do something like docker pull registry.hub.docker.com/library/mono in a custom build script it will fail with "could not reach any registry point". Reason seems to be that any docker client version from 1.5 and down is no longer supported by the docker hub registry.
Please, update Docker. Your current version is outdated (little) and doesn't support commands like cat /data/teamcity_agent/conf/gcloud.service-key | docker login -u _json_key --password-stdin https://gcr.io
I am attempting to connect a Linux docker agent to a TeamCity 2019.1 server. The server is hosted behind a Caddy (https://caddyserver.com) reverse proxy with transparent proxying including WebSocket. The server also uses a Let's Encrypt wildcard certificate. For some reason which I am unable to grasp, the agent refuses to connect to the server.
Here is the log:
https://gist.github.com/NEXUS2345/93a56c98d346e0094d4e90e395862832
Any help is greatly appreciated.
Hi, I'm running some integration tests through gradle
which in turn start docker-compose
services. As for now, I'm getting an error during the build which tells that docker-compose
was not found.
How do I install docker-compose
command into TC agent?
Can't seem to get DOCKER_IN_DOCKER=start work for Fargate tasks.. Is it supported?
This is the error I get on builds which uses docker stuff (not the Docker plugin):
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I have set environment variable DOCKER_IN_DOCKER=start
Anyone got this to work with Fargate tasks?
FYI: It works with EC2 tasks
Hi!
I am Docker newbie and just out of curiosity I wanna ask: what is the purpose of re-tagging the image (as suggested in the README of the repository)?
If you need to build your own image, you need to perform the following:
Pull our minimal agent image and re-tag it
Isn't it bad practice to create a local tag? Doesn't it prevent my docker daemon from checksumming the image in the docker registry (DockerHub) against my local copy? If you update the docker image on DockerHub I will not get the latest version if I use my own re-tagged images for building my custom agent images.
Is this a common practice when building my customized docker images based on another?
The .net core version of teamcity agent docker in windows is 2.0 now.
I have a problem that how to update the .net core version to 2.1 ?
I have searched history of this repository to find any solution, then "Don't install dotnet core sdk explicitly" had been found.
Is dotnet-framework-build contains .net core ?
As a beginner of docker, I'm confused to how .net core was included, so that I can't follow the same steps to update .net core.
Currently no docker executable included in them.
Possible ways to get access to the docker daemon in container: https://github.com/JetBrains/teamcity-docker-agent#expose-docker-engine-to-container
How do we get the agent to accept successfully connect to the server using HTTPS if it is using a certificate signed by an internal/unknown CA?
Currently I'm having to connect over HTTP which is less than ideal.
Hi there,
I would like to use this image (specifically the ubuntu
image), but in my case, I need to add a custom, self-signed SSL certificate to the java cacert store and then restart the build agent process in order to pick up the new cert. What is the best way to restart the build agent process? Would it be easiest to simply reboot the container all together? It looks like there is also a hook in /opt/buildagent/bin/agent.sh
to stop and start the agent. I just want to be sure that whichever way I decide to do it that it has the appropriate configuration/environment variables it needs to run properly. Thank you in advance
The below output is from just running docker run -it -e SERVER_URL="https://localhost/" jetbrains/teamcity-agent
. It appears that the first few characters of the log lines are being eaten by something - possibly bad log formatting options somewhere?
[2018-02-28 18:54:18,227] INFO - rver.plugins.PluginManagerImpl - ===========================================================
[2018-02-28 18:54:18,227] INFO - rver.plugins.PluginManagerImpl - Plugins initialization started...
[2018-02-28 18:54:18,228] INFO - rver.plugins.PluginManagerImpl - Scanning plugins folders
[2018-02-28 18:54:18,229] INFO - .plugins.files.JarSearcherBase - Scanning plugin folder: /opt/buildagent/plugins
[2018-02-28 18:54:18,230] INFO - .plugins.files.JarSearcherBase - Scanning plugin folder: /opt/buildagent/tools
[2018-02-28 18:54:18,240] INFO - rver.plugins.PluginManagerImpl - Found 1 non bundled plugins: [amazonEC2]
[2018-02-28 18:54:18,240] INFO - rver.plugins.PluginManagerImpl - Found 0 bundled plugins: []
[2018-02-28 18:54:18,241] INFO - rver.plugins.PluginsCollection - Load shared classloader for 1 plugins [amazonEC2]
[2018-02-28 18:54:18,245] INFO - rver.plugins.PluginsCollection - No plugins were loaded with standalone classloaders
[2018-02-28 18:54:18,336] INFO - rver.plugins.PluginManagerImpl - Plugins initialization completed (1 plugins loaded): [amazonEC2]
[2018-02-28 18:54:18,338] INFO - rver.plugins.PluginManagerImpl - ===========================================================
I hit an issue today where I have a bulid step, which involves running an executable file. My build is presently failing, because my TeamCity Agent doesn't have permission apparently to run the EXE. The EXE is located in the build directory. Both the TeamCity Server and the Build Agent reside in Azure Kubernetes Services, and are running version TeamCity.2018.1 Other than this issue, the Build Agent has been working well; it can pull down source code, run NPM commands and the like. It just can't seem to run this EXE.
If the Agent were hosted on a Windows machine, I'd simply RDP on to that machine, amend the User Account under which the Agent Service was running to use an account with elevated permissions, and have confidence that would allow the Build Agent to do what it needs to do. But I'm unsure what the equivalent step I should take is when the Agent is running in Docker / Linux, on AKS.
I've had a look through the TeamCity documentation, but couldn't find any info specific to this scenario. Any ideas how I can achieve what I need to here?
Any plans to support .NET Core 2.1.300?
https://blogs.msdn.microsoft.com/dotnet/2018/05/30/announcing-net-core-2-1/
I'm trying to build the agent image using this repository (since we need .net core 3.1 sdk installed on the agent and the image from docker hub is still using 3.0.100) but the build fails at "STEP 4", presumably while installing "libc" binaries with a gzip error.
For better understanding I have attatched the last few lines of the build log.
As base image I tried using the minimal agent image from docker hub and one that I build on my machine following the instructions on its repository. Both were resulting in the same error message.
Please let me know if you are able to reproduce the behaviour or if I'm doing something wrong here.
Edit: Forgot to mention I'm building on Windows using docker containers. I'm aiming to build an agent running on ubuntu.
I want to configure with environment variables also the ownAddress and ownPort for the Agent.
In order to achieve that, I patched the run-agent.sh
--- run-agent.sh 2018-02-02 13:11:49.000000000 +0100
+++ run-agent.sh 2018-02-02 13:10:44.000000000 +0100
@@ -19,6 +19,8 @@
[[ -n "${SERVER_URL}" ]] && opts[${#opts[@]}]='--server-url' && opts[${#opts[@]}]="$SERVER_URL"
[[ -n "${AGENT_TOKEN}" ]] && opts[${#opts[@]}]='--auth-token' && opts[${#opts[@]}]="$AGENT_TOKEN"
[[ -n "${AGENT_NAME}" ]] && opts[${#opts[@]}]='--name' && opts[${#opts[@]}]="$AGENT_NAME"
+ [[ -n "${OWN_ADDRESS}" ]] && opts[${#opts[@]}]='--ownAddress' && opts[${#opts[@]}]="$OWN_ADDRESS"
+ [[ -n "${OWN_PORT}" ]] && opts[${#opts[@]}]='--ownPort' && opts[${#opts[@]}]="$OWN_PORT"
if [[ 0 -ne "${#opts[@]}" ]]; then
# Using sed to strip double quotes produced by docker-compose
for i in $(seq 0 $(expr ${#opts[@]} - 1)); do
I'm having the same issue reported here โ in that I cannot get the tc-agent to talk to a self-hosted docker registry found at myserver.local
(i.e. a .local) address. It can fetch images from dockerhub, but not our internal registry.
According to this comment, there already should be a fix โ but I'm not seeing it.
Is it only me?
Using jetbrains/teamcity-agent:latest
on Ubuntu.
Hi, is there any way to run a similar TeamCity build agent on a Windows host using Docker? Or any plans for this?
I haven't found a lot of resources on running Windows based build-agents on docker, let alone TeamCity agents.
Some sources for msbuild on Windows:
http://blog.alexellis.io/3-steps-to-msbuild-with-docker/
microsoft/dotnet-framework-docker#2
Using: TeamCity Server 2018.1.1 running on Windows 10 Enterprise 1803
Using: Docker Cloud plugin to launch agents
Docker image: jetbrains/teamcity-agent:2018.1.1-nanoserver-sac2016
When a build agent is commanded to shut down by TC, either because of manual request ("Stop" clicked from Agents->Cloud screen) or automatic shutdown via plugin configuration ("Terminate after first build" setting), the container is immediately shut down successfully, but TeamCity reports "Cloud image is not configured to stop agents gracefully. The agent that was not stopped gracefully might be assigned with the build."
I have set a shutdown timeout of two minutes on the container but that does not help. From everything I can tell, the container is gracefully shutting down but I believe the agent process within is not.
phantomjs requires bzip2 to untar its builds. Any node.js projects including phantomjs will break on build without this package.
Solution:
Please add bzip2 to the apt-get list in the ubuntu build list.
Please, provide examples for SERVER_URL value at the case both client and server containers are managed by the same docker.
After an otherwise successful build, I'm getting failures with the NuGet Publish
step. I'm using NuGet.exe
version 4.7.1, and a image based on jetbrains/teamcity-agent:2018.1.1-windowsservercore-1803
(with added Windows SDK for debugging tools to support symbol server plugin). I am running the build agent image as a swarm of scale 1 (for testing), with default networking. The log looks like this:
[01:45:35] Step 10/11: NuGet Publish (1m)
[01:45:36] [Step 10/11] Attempt to publish symbol package. Symbol packages are not fully supported by TeamCity internal feed. For more details see https://confluence.jetbrains.com/display/TCDL/NuGet#NuGet-symbols
[01:45:36] [Step 10/11] push: Publish package Api.Logging\bin\Release\Redacted.Api.Logging.Redist.2.0.0-alpha-00000056.symbols.nupkg (1m)
[01:45:36] [push] NuGet command: C:\BuildAgent\tools\NuGet.CommandLine.4.7.1\tools\NuGet.exe push C:\BuildAgent\work\2c2ee6feb437097a\Api.Logging\bin\Release\Redacted.Api.Logging.Redist.2.0.0-alpha-00000056.symbols.nupkg ******* -Source http://redacted.redactedinternaldomain/nuget/internal
[01:45:36] [push] Starting: C:\BuildAgent\temp\agentTmp\custom_script2499889723989314163.cmd
[01:45:36] [push] in directory: C:\BuildAgent\work\2c2ee6feb437097a\Api.Logging\bin\Release
[01:45:38] [push] Pushing Redacted.Api.Logging.Redist.2.0.0-alpha-00000056.symbols.nupkg to 'http://redacted.redactedinternaldomain/nuget/internal'...
[01:45:38] [push] PUT http://redacted.redactedinternaldomain/nuget/internal/
[01:45:57] [push] An error was encountered when fetching 'PUT http://redacted.redactedinternaldomain/nuget/internal/'. The request will now be retried.
[01:45:57] [push] An error occurred while sending the request.
[01:45:57] [push] The underlying connection was closed: An unexpected error occurred on a receive.
[01:45:57] [push] Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
[01:45:57] [push] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
[01:45:58] [push] PUT http://redacted.redactedinternaldomain/nuget/internal/
[01:46:17] [push] An error was encountered when fetching 'PUT http://redacted.redactedinternaldomain/nuget/internal/'. The request will now be retried.
[01:46:17] [push] An error occurred while sending the request.
[01:46:17] [push] The underlying connection was closed: An unexpected error occurred on a receive.
[01:46:17] [push] Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
[01:46:17] [push] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
[01:46:17] [push] PUT http://redacted.redactedinternaldomain/nuget/internal/
[01:46:36] [push] The underlying connection was closed: An unexpected error occurred on a receive.
[01:46:36] [push] Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
[01:46:36] [push] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
[01:46:36] [push] Process exited with code 1
[01:46:37] [push] Process exited with code 1 (Step: )
[01:46:36] [Step 10/11] Step NuGet Publish failed
Host redacted.redactedinternaldomain
is a ProGet server running within our internal network as a standalone server (no docker involved). The actual domain name does not end in .local
(I'm aware of some issues with that suffix).
Running the exact same nuget push
from a powershell console on the Windows Server 2016 docker host machine works as expected.
If I obtain a powershell console on the running docker container and run the exact same nuget push
explicitly (with the correct -ApiKey
argument added), I get the same error. However, running nuget list -Source http://redacted.redactedinternaldomain/nuget/internal
works as expected. I find this quite puzzling: from testing on a Windows 10 desktop with Fiddler, nuget list
issues a set of HTTP GET requests, and receives responses; nuget push
issues a single HTTP PUSH and receives a response. From looking at firewall logs on the docker host Windows Server (disclaimer: I am not a networking expert), several incoming UDP packets get blocked when I issue the nuget push
- almost as if the firewall does not recognise the incoming UDP packets as being part of an established outbound connection. Why this would differ for push
vs list
I have no idea.
It would be good to know if the NuGet Publish
step is working for other people under similar conditions.
Hello,
When can we expect support for dotnet sdk 3.0? It has been officially released in September by microsoft.
Thanks and best regards
Peter
Hi,
I'm trying to run a TeamCity agent in a container.
This is environment:
The TeamCity and the agent are the latest from the container (2018.1.3 (build 58658))
The container is run in Docker for Windows, using Linux containers (because the production will run on Ubuntu).
root@teamcity-agent3:/opt/buildagent/work/70bf5e8b1cc61bbe/src# dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.1.401
Commit: 91b1c13032
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /usr/share/dotnet/sdk/2.1.401/
Host (useful for support):
Version: 2.1.3
Commit: 124038c13e
.NET Core SDKs installed:
2.1.401 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
When I run the build using
/opt/buildagent/work/70bf5e8b1cc61bbe/src# /usr/bin/dotnet build trains.sln --framework netcoreapp2.1 --configuration Release --runtime ubuntu-x64
in the container, the build is successful.
However when I run the same command as part of a build step, I get this error:
Failed to initialize CoreCLR, HRESULT: 0x80004005
Any ideas on why this error occurs?
Since the shell script referenced while building dockerfile is one level up we are having issues building the docker image.
We should probably move run-docker.sh in the ubuntu folder.
Can we get support for Core 2.2?
Are their plans to add .NET Core to the Ubuntu images? Seems to make sense to allow the build there as well.
The Dockerfile
sets NUGET_XMLDOC_MODE=skip
. I can see that this would help performance. However, I can find no general TeamCity documentation that advises making this change on build agents. Therefore it would seem likely that this is not set on most users' non-Docker-based agents. And so it seems odd that it would be set on the Docker image, which, arguably, should represent the typical agent configuration that a user would have created by hand following the best practices advocated by the relevant TeamCity documentation.
In our case, we have a custom code generation tool (consumed as a NuGet package) that, among other things, mirrors documentation from base classes into overridden methods in the generated classes - and the XML documentation files are needed for this. So this setting breaks our builds.
\
echo "Installing Google Cloud SDK..." && \
apt-get update && \
apt-get install -y --no-install-recommends apt-transport-https && \
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - && \
apt-get update && \
apt-get install -y --no-install-recommends google-cloud-sdk && \
rm -rf /var/lib/apt/lists/* && \
gcloud config set core/disable_usage_reporting true && \
gcloud config set component_manager/disable_update_check true && \
\
Is will allow to use gsutil tools to sync local static folder with google cloud storage bucket (like s3 equivalent)
From:
https://cloud.google.com/storage/docs/gsutil_install#deb
I've just pulled the Ubuntu image from Docker Hub and I noticed it is currently out of sync with the project's master
branch.
According to the docker images
command, the image was last published 4 weeks ago:
jetbrains/teamcity-agent latest 5ae0b299f785 4 weeks ago 1.4GB
... and at the moment of writing this comment the corresponding Docker file was last updated just over two weeks ago.
On the same note, would you guys consider Git-tagging the releases that you publish to Docker Hub?
after restarting container with docker-in-docker, docker failed to start. In /var/log/docker.log I see the following line - Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid.
Suggestion - modify run-docker.sh to delete this file before starting the docker
In the .NET CLI was introduced a new set of environment variables:
dotnet/announcements#71
When agent is building maven goal package it reports that the following packages does not exists:
Agent parameters:
docker.server.osType linux
docker.server.version 17.09.0
docker.version 17.06.0
teamcity.agent.hardware.cpuCount 6
teamcity.agent.hardware.memorySizeMb 11845
teamcity.agent.home.dir /opt/buildagent
teamcity.agent.hostname teamcity.agent1
teamcity.agent.jvm.file.encoding UTF-8
teamcity.agent.jvm.file.separator /
teamcity.agent.jvm.java.home /usr/lib/jvm/oracle-jdk/jre
teamcity.agent.jvm.os.arch amd64
teamcity.agent.jvm.os.name Linux
teamcity.agent.jvm.os.version 3.10.0-693.5.2.el7.x86_64
teamcity.agent.jvm.path.separator :
teamcity.agent.jvm.specification 1.8
teamcity.agent.jvm.user.country US
teamcity.agent.jvm.user.home /root
teamcity.agent.jvm.user.language en
teamcity.agent.jvm.user.name root
teamcity.agent.jvm.user.timezone Etc/UTC
teamcity.agent.jvm.version 1.8.0_131
teamcity.agent.launcher.version 50574
teamcity.agent.name teamcity.agent1
teamcity.agent.os.arch.bits 64
teamcity.agent.ownPort 9090
teamcity.agent.protocol polling
teamcity.agent.tools.dir /opt/buildagent/tools
teamcity.agent.work.dir /opt/buildagent/work
teamcity.agent.work.dir.freeSpaceMb 6482
teamcity.hg.agent.path hg
teamcity.hg.version 3.7.3
teamcity.serverUrl http://teamcity.server:8111
teamcity.tool.JetBrains.dotCover.CommandLineTools.bundled /opt/buildagent/tools/JetBrains.dotCover.CommandLineTools.bundled
teamcity.tool.TeamCity.Dotnet.Integration.1.0.0 /opt/buildagent/plugins/dotnet.cli/tools/TeamCity.Dotnet.Integration.1.0.0
teamcity.tool.TeamCity.Dotnet.Integration.BUNDLED /opt/buildagent/plugins/dotnet.cli/tools/TeamCity.Dotnet.Integration.1.0.0
teamcity.tool.TeamCity.Dotnet.Integration.DEFAULT /opt/buildagent/plugins/dotnet.cli/tools/TeamCity.Dotnet.Integration.1.0.0
teamcity.tool.ant-net-tasks /opt/buildagent/tools/ant-net-tasks
teamcity.tool.gant /opt/buildagent/tools/gant
teamcity.tool.idea /opt/buildagent/tools/idea
teamcity.tool.jacoco /opt/buildagent/tools/jacoco
teamcity.tool.jetbrains.resharper-clt.bundled /opt/buildagent/tools/jetbrains.resharper-clt.bundled
teamcity.tool.jps /opt/buildagent/tools/jps
teamcity.tool.maven /opt/buildagent/tools/maven
teamcity.tool.maven3 /opt/buildagent/tools/maven3
teamcity.tool.maven3_1 /opt/buildagent/tools/maven3_1
teamcity.tool.maven3_2 /opt/buildagent/tools/maven3_2
teamcity.tool.maven3_3 /opt/buildagent/tools/maven3_3
Hello! I am having a really hard time setting up my docker build agent to build projects that use nvm/node/npm. I have created a Dockerfile like this:
FROM jetbrains/teamcity-agent
ENV SERVER_URL=https://tc-master.gc.local:8080
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
# Install the self-signed TeamCity server SSL cert
COPY teamCityCert.cer /root/teamCityCert.cer
RUN keytool -importcert -file /root/teamCityCert.cer -keystore /usr/lib/jvm/oracle-jdk/jre/lib/security/cacerts -storepass pass -noprompt
When I build a new image using this dockerfile, it seems to install nvm correctly:
PS> docker build -t teamcity-agent-linux .
Sending build context to Docker daemon 5.632kB
Step 1/5 : FROM jetbrains/teamcity-agent
---> 5ae0b299f785
Step 2/5 : ENV SERVER_URL=https://tc-master.gc.local:8080
---> Running in 289df490e0d6
Removing intermediate container 289df490e0d6
---> ccbe76e4485d
Step 3/5 : RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
---> Running in e1f3432040ee
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12540 100 12540 0 0 19842 0 --:--:-- --:--:-- --:--:-- 19841
=> Downloading nvm from git to '/root/.nvm'
=> Cloning into '/root/.nvm'...
Note: checking out '7ad6d98cedde01809e32d56ab8ced064f6f28175'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
=> Compressing and cleaning up git repository
=> Appending nvm source string to /root/.bashrc
=> Appending bash_completion source string to /root/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
Removing intermediate container e1f3432040ee
---> aff4018d04bc
Step 4/5 : COPY teamCityCert.cer /root/teamCityCert.cer
---> f85469c33073
Step 5/5 : RUN keytool -importcert -file /root/teamCityCert.cer -keystore /usr/lib/jvm/oracle-jdk/jre/lib/security/cacerts -storepass pass -noprompt
---> Running in 267fa7f5411b
Certificate was added to keystore
Removing intermediate container 267fa7f5411b
---> 10320cb850ad
Successfully built 10320cb850ad
Successfully tagged teamcity-agent-linux:latest
The agent connects to teamcity correctly, and I have authorized the agent from the TeamCity admin UI. However, when I go to build a project, the build always fails:
[13:05:12]/opt/buildagent/temp/agentTmp/custom_script6044565268267893228: line 1: nvm: command not found
[13:05:12]Process exited with code 127
The agent process appears to be running as root in the container, but do the individual builds get kicked off with the buildagent
user? In which case, does nvm need to be installed as the buildagent
user? (I tried this in the Dockerfile by placing USER buildagent
before the nvm install, but it still did not work).
For what it's worth, when I log into the container, it appears to pick up the .bashrc and finds nvm in the path:
PS> docker exec -it 6c35ea79def1 bash
root@6c35ea79def1:/# nvm
Node Version Manager
...
Thank you in advance
Hello. I have some problem with starting buildAgent.
Inside the container begins infinity loop after start.
That is how i start container:
docker run -itd -e SERVER_URL="http://teamcity.domain.com" -v /opt/tc_agent/:/data/teamcity_agent/conf -p 0.0.0.0:9090:9090 jetbrains/teamcity-minimal-agent
Seems that each loop cycle finishing with
[2017-09-02 15:39:59,524] INFO - jetbrains.buildServer.AGENT - Upgrade mode: jetbrains.buildServer.agent.impl.upgrade.modes.FullUpgradeMode
[2017-09-02 15:39:59,533] INFO - rocesses.ProcessTreeTerminator - Using jetbrains.buildServer.processes.ProcessTreeTerminatorLinux
[2017-09-02 15:39:59,534] INFO - .ProcessTreeTerminatorImplBase - Will use command 'sh -c echo $$ && ps awwxo pid,ppid,command | tee'.
[2017-09-02 15:39:59,564] INFO - .ProcessTreeTerminatorImplBase - Will use command 'sh -c echo $$ && ps awwxo pid,ppid,command | tee'.
[2017-09-02 15:39:59,588] INFO - ses.ProcessTreeTerminatorLinux - Second thread id is 246
[2017-09-02 15:39:59,588] INFO - ses.ProcessTreeTerminatorLinux - Thread is Process thread model: false
[2017-09-02 15:39:59,589] INFO - .ProcessTreeTerminatorImplBase - Collecting processes from the current one, current process PID 246
[2017-09-02 15:39:59,589] INFO - .ProcessTreeTerminatorImplBase - No processes to kill
[2017-09-02 15:39:59,590] INFO - jetbrains.buildServer.AGENT - Exit for upgrade
[2017-09-02 15:39:59,590] INFO - ent.impl.upgrade.AgentExitCode - Agent exited. Upgrade process
[2017-09-02 15:39:59,591] INFO - buildServer.agent.AgentMain2$2 - Closing jetbrains.buildServer.agent.AgentMain2$2@3cef309d: startup date [Sat Sep 02 15:39:41 UTC 2017]; root of context hierarchy
And next lines again from begin
[2017-09-02 15:39:03,723] INFO - s.buildServer.agent.AgentMain2 - ===========================================================
[2017-09-02 15:39:03,738] INFO - s.buildServer.agent.AgentMain2 - TeamCity Build Agent 2017.1.3 (build 46961)
[2017-09-02 15:39:03,745] INFO - s.buildServer.agent.AgentMain2 - OS: Linux, version 3.10.0-514.16.1.el7.x86_64, amd64, Current user: root, Time zone: UTC
[2017-09-02 15:39:03,746] INFO - s.buildServer.agent.AgentMain2 - Java: 1.8.0_131, Java HotSpot(TM) 64-Bit Server VM (25.131-b11, mixed mode), Java(TM) SE Runtime Environment (1.8.0_131-b11), Oracle Corporation; JVM parameters: -ea -Xmx384m -Dteamcity_logs=../logs/
What i'm doing wrong? Thanks
Will be nice if out of the box there will be Visual Studio related binaries so we can use this image to build not only dotnet core apps but also good old .net
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:
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND noninteractive
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN apt-get update && \
apt-get install -y wget gnupg && \
apt-get install -y --no-install-recommends locales && \
locale-gen en_US.UTF-8 && \
apt-get dist-upgrade -y && \
apt-get --purge remove openjdk* && \
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections && \
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu bionic main" > /etc/apt/sources.list.d/webupd8team-java-trusty.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 && \
apt-get update && \
apt-get install -y --no-install-recommends oracle-java8-installer oracle-java8-set-default && \
apt-get clean all
teamcity-minimal-agent/Dockerfile:
FROM teamcity-base
MAINTAINER Kateryna Shlyakhovetska <[email protected]>
VOLUME /data/teamcity_agent/conf
ENV CONFIG_FILE /data/teamcity_agent/conf/buildAgent.properties
LABEL dockerImage.teamcity.version="latest" \
dockerImage.teamcity.buildNumber="latest"
COPY run-agent.sh /run-agent.sh
COPY run-services.sh /run-services.sh
COPY dist/buildagent /opt/buildagent
RUN useradd -m buildagent && \
chmod +x /run-agent.sh /run-services.sh && sync
CMD ["/run-services.sh"]
EXPOSE 9090
teamcity-agent/Dockerfile:
FROM teamcity-minimal-agent
MAINTAINER Vladislav Rassokhin <[email protected]>
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 && \
\
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
# apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 && \
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stable" > /etc/apt/sources.list.d/docker.list && \
\
apt-cache policy docker-ce && \
apt-get update && \
apt-get install -y docker-ce && \
# systemctl disable docker && \
curl -SL https://github.com/docker/compose/releases/download/1.20.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 \
libc6 \
libcurl3 \
libgcc1 \
libgssapi-krb5-2 \
libicu55 \
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 && \
\
usermod -aG docker buildagent
COPY run-docker.sh /services/run-docker.sh
Long term supported 2016 images were removed in this commit that says "Provide Windows 1809 containers". Was this really intentional?
We still run 2016 servers (update takes time, it's LONG term support after all) and not having new Team City versions for the Windows version that was the latest long term up to very recently seems a bit premature imho.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.