I would like to execute docker.build command during Jenkins pipeline , with the --add-host parameter as I want to add a line in  the /etc/host file.

      Something like: docker build t tag:latest-add-host="host:127.128.0.1" .

      I canĀ“t find a way to do this with jenkins and docker yet, is this possible? 

      Right now my pipeline only runs  docker.build(imageNameTagged)

          [JENKINS-56624] docker.build

          I tried with : 
          docker.build(imageNameTagged) , "--add-host=app.xxxx.com host-name.domain.com:172.x.x.x" 
          But no entry was added in host/file.

          guillermo casco added a comment - I tried with :  docker.build(imageNameTagged) , "--add-host=app.xxxx.com host-name.domain.com:172.x.x.x"  But no entry was added in host/file.

            vjuranek vjuranek
            yiyito guillermo casco
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: