Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Oct 05 15:45
    schowdiah commented #65
  • Sep 16 09:57
    kxalex commented #160
  • Sep 16 09:56
    kxalex commented #160
  • Sep 10 12:07
    robyp1 commented #65
  • Sep 10 12:06
    robyp1 commented #65
  • Jul 14 09:17
    jcfandino closed #116
  • Jul 07 12:48
    rud closed #157
  • Jul 06 12:47
    rud commented #157
  • Jun 11 10:50
    mpetuska commented #159
  • May 31 17:44
    asasisekar edited #160
  • May 31 17:43
    asasisekar opened #160
  • May 29 07:38
    Abhi1401 commented #90
  • May 29 07:37
    Abhi1401 commented #29
  • May 29 07:35
    Abhi1401 commented #90
  • Jan 19 14:38
    jc9464 opened #159
  • Aug 20 2020 11:48
    mgerhardy opened #158
  • Feb 21 2020 15:42
    philbrock commented #135
  • Jan 20 2020 12:39
    rud review_requested #157
  • Jan 07 2020 15:20
    rud commented #157
  • Nov 20 2019 09:24
    rud commented #157
Matthias Grüter
e.g. useful for container linking
In general it is considered a good practice to use EXPOSE whenever possible.
Dave Syer
OK. Thanks. I use it in other containers.
This one is just so basic it didn't necessarily warrant it. But I think you are right: it's at least a courtesy to the user (assuming he has access to the Dockerfile - which I would think would be more customary than it seems to be in the Docker community).
Martin Chalupa
Hi guys, I would like to about usage of your plugin on Mac. I've found that it is necessary to setup ip form my boot2docker VM as an API URL. You use docker-java library and I went through their code and it seems that it can use env variables (DOCKER_HOST, DOCKER_CERT and DOCKER_TSL_VERIFY) if you don't specify otherwise. Can I use this in current 1.2 version and I just missed that or do you plan it to another release? I would like to avoid putting ip to gradle files.
Greg L. Turnquist
Regarding the export variables, I include specific steps to ensure that is setup on your mac to support the docker command. Is that addressing your question?
A thread on SO directed me to put this into .bash_profile => $(boot2docker shellinit 2> /dev/null)
That way, the exports are configured every time you open a new shell.
Martin Chalupa
I wasn't sure if your and docker-java integration supports env variable usage. But it does. I execute gradle distDocker from IntelliJ and it doesn't have variable properly setup. Thanks for pointing me in correct direction.
Greg L. Turnquist
I can verify the update to our guide also works on my mac. Albeit, it is configured to push to a group I have no access to, and which no reader will have access to. So I'm leary about having a failing step in our guide.
Dave Syer
We can take that discussion elsewhere
its nothing to do with the gradle tooling
Bruno René Santos
Hello all. Is there any way to include the param insecure-registry when pushing to a private registry?
Niklas Carlsson
insecure-registry has to be set as a startup parameter to the docker daemon, so there's not much the plugin can do about that at the moment. I think there are still some open issues about being able to do it ad-hoc on push and pull commands too
Hi all. Is it in plan to have a functionality which can run/stop the image created by the plugin?
Hi all. Will the docker-java-client be updated soon? I need a newer version as my docker host wont accept versions below 1.12.
Stanislav Ivanov
Hello, guys. I didn't find in docs if the plugin is able to connect docker over tls (port 2376) rather than plain http (port 2375). Is it possible?
Zachary Rote
Hey guys. Any of you have an example of using the addFile task within distDocker? I'm attempting to package override application properties into my generated tar file.
Stefán Freyr Stefánsson
Hi there. I'm working on creating some docker containers in our build scripts using Transmode's gradle-docker plugin. I'm wondering what the correct way is for my scenario which is that in each "build cycle" we create multiple containers, one "tools" container and then multiple containers that extend the tools container and only differ by which ports they expose and what entrypoint is used. So I would like to create the tools container in one task and then create all the other derived containers in other tasks but I'm not sure how I can do this without having the "tools container task" publish our tools container to a docker hub and have the other tasks pull that container. I hope I'm making myself at least vaguely clear here... does anybody have a solution to this?
Hi all! Is it possible to run build script using /bin/sh?
Hi..How to push image to a private repository. The Repository needs to be specified as registry="example.com". How to mention the username and password ?
Hi all. Is gradle-docker plugin will be able to work with Docker Remote API when the version of the docker is 1.12+ ?
Jakub Jabłoński
Is there any chance that this plugin will be published in gradle plugins repo ?
Hi All
Is there a channel to ask Gradle questions?
Hi, when I've got my dockerfile build and want to publish, how is this done? I can't seem to figure out how the "docker tag image username/repository:tag" and "docker push username/repository:tag" is done in this plugin
Dave Syer
I think you get a tag by default (based on the groupId and jar name). It's easy to check.
Then you can just docker push (you don't need gradle for that)
yes I've applied the group, applicationName and tagVersion. But how do i access my tag variable, $tag ?
(and yes i want to keep using gradle for pushing)
Dave Syer
I don't think you can (use gradle with this plugin to push)
I never did anyway. If they added that feature I missed it.
I don't understand the question about $tag.
Ok, well I'll find another way then, thank you :)

@dsyer looking at the source tells me otherwise tho: https://github.com/Transmode/gradle-docker/blob/master/src/main/groovy/se/transmode/gradle/plugins/docker/DockerTask.groovy

on the very last lines you have a check for if push == True, which will involke the push. I will just try that and return if it works

Dave Syer
Sounds good. Maybe you could fix the README if you find that it works.
@dsyer It works: make a task with type: Docker, set applicationName and tag, set push=true <-- job done.. This really needs to be documented better :)! I'm no developer, is it open for anyone to fix this ?
oh i can just make a pullrequest for better documenting
Dave Syer
You can.
Justin Fleck
greetings! I commented on Transmode/gradle-docker#122 but will try to tackle to problem
Hi there! Is there a way to set environment variable for the docker image produces by distDocker task?

A problem occurred evaluating root project 'history'.

Plugin with id 'docker' not found.

why i got this problem ?
Alican BALIK

Hi, I have just started using se.transmode.gradle for docker, and I get the following error: Type 'se.transmode.gradle.plugins.docker.DockerTask' property 'apiPassword' is missing an input or output annotation.

I created a plugin as following and applied it as apply plugin: 'docker'

docker {
    apiEmail 'e@e.com'
    apiPassword 'p'
    apiUsername 'us'
    baseImage 'im'

and the same error keeps occurring for each property. What am l missing?

Parvathy j a
@AlicanBalik ..did the above error got resolved?