- A successful installation of Docker Engine (https://docs.docker.com/engine/install/)
Repository: https://hub.docker.com/r/jetbrains/teamcity-agent/
$ docker pull jetbrains/teamcity-agent
Upgrade Notes: https://www.jetbrains.com/help/teamcity/upgrade-notes.html#Agent+Docker+images+run+under+non-root+user - (Must see)
Create a config directory for the new agent
$ mkdir -p /opt/teamcity/agent0/config
Add ownership to directory
$ chown 1000 /opt/teamcity/agent0/config
Note: See the TeamCity Agent Documentation and Upgrade Notes for more details.
docker run -it -d --privileged \
--name teamcity-agent0 \
--user $(id -u) \
-e SERVER_URL="https://teamcity.sareno.me" \
-e AGENT_NAME="agent0" \
-v /opt/teamcity/agent0/config:/data/teamcity_agent/conf \
jetbrains/teamcity-agent
-d
- Detach from container--privileged
- Give the user an Admin access for Network etc. (If unset, Docker-in-Docker daemon will fail to start)
By default, Docker daemon isn't started. To start the Docker daemon.
Open the TeamCity-Agent container terminal
$ docker ps #copy the CONTAINER ID
$ docker exec -ti <CONTAINER-ID> bash
Start Docker daemon
$ dockerd &> dockerd-logfile &
# check out the log stream, to cancel use ctrl+c
tail dockerd-logfile
# just to see it's still running
ps -ef
Reference: https://stackoverflow.com/a/54853549/8724367
$ docker info
For commiting and pushing image to Docker Hub, see https://gist.github.com/dev-sareno/3aae5d8b57ab1bbd975f9ffdc61b7994.