Docker compose in CI/CD on docker agents (OD-2194)
Juraj Lahvička opened 1 year ago

Hello,

I have created a docker agent and I want to run a docker compose file in it (Integration tests that contains multiple services). But it is not possible as when running a command it says: This step can only be executed by server shell executor or remote shell executor. I also tried to run simple echo command step and that also says it can be only executed on the server shell or remote shell executor. When I added the docker agents to Remote Shell executors it said that those can be only set for bare metal agents. Is it really not possible to execute any command on the docker agents? Or is there a way how to run the docker compose on the docker agents as I don't want to create VMs.

  • Juraj Lahvička commented 1 year ago

    I now set the jeb to run only on the remote shell executors and remove the IN_DOCKER file on the docker agent and it passed OK. Would it be possible to add option if user wants to run the commands on the agents in docker. Basically docker in docker.

  • Robin Shen commented 1 year ago

    If you want to run command outside of container, please run the agent directly on your machine by downloading the zip file instead of running it as a container. As agent running in a container can not access OS shell.

  • Robin Shen commented 1 year ago

    Also make sure to add a remote shell job executor matching your agent.

  • Juraj Lahvička commented 1 year ago

    Hello, thanks for the fast response. I think I should have asked better question. Would it be possible to add docker compose job step and the docker compose plugin straight into 1dev/agent image? For example teamcity has this kind of build step build into their agent image and can be set: image.png where user just defines path to docker compose file: image_2.png

  • Robin Shen commented 1 year ago

    I filed a feature request for this: OD-2198

  • Juraj Lahvička commented 1 year ago

    Awesome thank you!

  • Robin Shen changed state to 'Closed' 1 year ago
    Previous Value Current Value
    Open
    Closed
issue 1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-2194
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover