• 1
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Problem Definition

      We cannot use run arguments with Docker Runner, so any custom configurations, such as granting privileged permissions

      Suggested Solution

      Allow Docker run arguments to be used

      Why this is important

      Users may want to add extra customizations to their Docker Runner containers.

      Workaround

      There is no workaround at this time.

            [BAM-19793] Allow use of arguments for Docker Runner

            Denner Bitti Padilha added a comment - - edited

            I'm using a workaround while this feature is not done.

             

            In the volume mounts, I "scaped" the tag --volume with /dev/null and use my own arguments 

            To get privileges you can use:

            Host directory         Container directory
            /dev/null              /dev/null --privileged

             

            To pass variable:

            Host directory         Container directory
            /dev/null              /dev/null -e JAVA_OPTIONS="-Xms512m -Xmx4g"

              

            Cheers

            Denner Bitti Padilha added a comment - - edited I'm using a workaround while this feature is not done.   In the volume mounts, I "scaped" the tag --volume with /dev/null and use my own arguments  To get privileges you can use: Host directory Container directory /dev/ null /dev/ null --privileged   To pass variable: Host directory Container directory /dev/ null /dev/ null -e JAVA_OPTIONS= "-Xms512m -Xmx4g"    Cheers

            Aun Raza added a comment -

            Running builds in Docker-runner is a half cooked feature. We need our builds to be dockerized , tagged and pushed to Docker repos, but using this feature we are unable to get the docker service itself running inside the Docker-Runner container. We can get it going if we pass --privileged flag during runtime. But unfortunately it seems no way to pass parameter during docker-runner start up

            Aun Raza added a comment - Running builds in Docker-runner is a half cooked feature. We need our builds to be dockerized , tagged and pushed to Docker repos, but using this feature we are unable to get the docker service itself running inside the Docker-Runner container. We can get it going if we pass --privileged flag during runtime. But unfortunately it seems no way to pass parameter during docker-runner start up

            I have a few projects that need privileged containers. so definitely needed!

            Niek Nooijens added a comment - I have a few projects that need privileged containers. so definitely needed!

            Forcing the --net=host argument is a problem in my scenario where I am running multiple agents on single Linux OS in order to utilize HW resources.

            I hoped that running builds inside Docker Containers would isolate them and stabililize them.

            However --net=host causes ports being propagated to hosting OS.

            Therefore if one build uses certain port then other build running in different Docker Container on same OS cannot use that port and hence fails.

            Therefore I suggest that --net=host is not forced by Bamboo and that I can specify --port mapping.

            Thank you.{{}}

            ondrej_lerch added a comment - Forcing the -- net=host  argument is a problem in my scenario where I am running multiple agents on single Linux OS in order to utilize HW resources. I hoped that running builds inside Docker Containers would isolate them and stabililize them. However -- net=host causes ports being propagated to hosting OS. Therefore if one build uses certain port then other build running in different Docker Container on same OS cannot use that port and hence fails. Therefore I suggest that -- net=host is not forced by Bamboo and that I can specify --port mapping. Thank you. {{}}

            If this feature were added, it would go a long way towards addressing all of these other issues:

            Right now, we're experiencing the issue described in BAM-20082 and when we tried implementing support for running containers in a user namespaces (e.g., Docker's userns-remap functionality), containers fail because bamboo is forcing the -net=host argument, which user namespaces doesn't support. And there's no way around it.

            It's surprising that the product owners at Atlassian allowed Bamboo to ship with Docker when such a glaring broken compatiblity issue between Docker Runner and the build cleanup feature existed.

            Please permit us to specify command-line arguments to docker run so that we can have some control over the way containers are leveraged in Bamboo. Thank you.

            Mike Eldridge added a comment - If this feature were added, it would go a long way towards addressing all of these other issues: BAM-20430 BAM-20298 BAM-20296 BAM-20277 BAM-20219 BAM-20157 BAM-20109 BAM-20082 BAM-19900 BAM-19827 Right now, we're experiencing the issue described in BAM-20082 and when we tried implementing support for running containers in a user namespaces (e.g., Docker's userns-remap functionality ), containers fail because bamboo is forcing the -net=host argument, which user namespaces doesn't support. And there's no way around it. It's surprising that the product owners at Atlassian allowed Bamboo to ship with Docker when such a glaring broken compatiblity issue between Docker Runner and the build cleanup feature existed. Please permit us to specify command-line arguments to docker run so that we can have some control over the way containers are leveraged in Bamboo. Thank you.

            Hi,

            Really need to be able to run whole job in container and to run final tasks as docker build. At this point I need to split compile in multiple stages which is not part of my project plan. 

            Marijan Kovacic added a comment - Hi, Really need to be able to run whole job in container and to run final tasks as docker build. At this point I need to split compile in multiple stages which is not part of my project plan. 

            Steven added a comment -

            I'd like this feature in order to be able to properly set up test/staging environments.

            My use-case would be to pass the `deployment` arg (i.e `staging`) and, as part of my docker instance, spin up a local database and populate it with dummy data.

            Steven added a comment - I'd like this feature in order to be able to properly set up test/staging environments. My use-case would be to pass the `deployment` arg (i.e `staging`) and, as part of my docker instance, spin up a local database and populate it with dummy data.

            Really need this feature to have VPN in the container, currently this makes the cloud instance of bamboo useless and gonna move away due lack of this feature.

            Niko Granö added a comment - Really need this feature to have VPN in the container, currently this makes the cloud instance of bamboo useless and gonna move away due lack of this feature.

            I have two use cases for this feature now (both related to using mount):

            • Use mount -t overlay to speed the build of a very large source directory
            • Use losetup / mount -t loop to create a file-based block device

             

            Darren Warner added a comment - I have two use cases for this feature now (both related to using mount): Use mount -t overlay to speed the build of a very large source directory Use losetup / mount -t loop to create a file-based block device  

              mgardias Marcin Gardias
              ezeidan Ellie Z (they/them)
              Votes:
              43 Vote for this issue
              Watchers:
              37 Start watching this issue

                Created:
                Updated:
                Resolved: