Giter Site home page Giter Site logo

Comments (9)

uschi2000 avatar uschi2000 commented on August 18, 2024

from gradle-docker.

jsundqvist avatar jsundqvist commented on August 18, 2024

Hey, thanks for the quick reply. I realize I probably should have included the docker snippet form my build.gradle. Sorry about that:

docker {
	name 'myorg/myapp'
	dependsOn tasks.distTar
	files 'build/distributions/'
}

I also tried with just dependsOn distTar as you said and the result is still a docker directory with everything but the build folder.

/Johannes

from gradle-docker.

uschi2000 avatar uschi2000 commented on August 18, 2024

from gradle-docker.

jsundqvist avatar jsundqvist commented on August 18, 2024

Well, I was hoping you could tell from my first post that this is what I tried first. Sorry for being unclear.

I have had dependsOn tasks.distTar declared the whole time.
The following tasks are invoked when I run gradle with ./gradlew clean docker:

:clean
:compileJava
:processResources UP-TO-DATE
:classes
:jar
:startScripts
:distTar
:dockerClean UP-TO-DATE
:dockerPrepare
:docker

I now set the docker snippet to the following as per your request, and still get the same result:

docker {
	name 'myorg/myapp'
	dependsOn distTar
}

So, to repeat: When I run the above command without explicitly setting the files argument, I end up with everything except build in the docker subdirectory. Without looking into the code in-depth, this is confirmed to me from viewing https://github.com/palantir/gradle-docker/blob/develop/src/main/groovy/com/palantir/gradle/docker/PalantirDockerPlugin.groovy#L94. I guess the reasoning behind this logic would be to not introduce a recursive infinite loop. My suggestion in this case is to exclude "${project.buildDir.name}/docker" instead of "${project.buildDir.name}".

In either case, it's not working.

My gradlew version is 3.2, the version of your plugin is 0.9.2, I'm running Oracle Java 8 on Debian 8.

from gradle-docker.

uschi2000 avatar uschi2000 commented on August 18, 2024

I tried the same setup and can't reproduce; can you link me to a repository, @jsundqvist ?

from gradle-docker.

uschi2000 avatar uschi2000 commented on August 18, 2024

see #91

from gradle-docker.

jsundqvist avatar jsundqvist commented on August 18, 2024

Not sure hos this is related since you are not ADDing from buildDir in your Dockerfile. Aren't you effectively circumventing the bug by placing foo.tgz in the root of the project?

from gradle-docker.

uschi2000 avatar uschi2000 commented on August 18, 2024

foo.tgz gets produced inside build/ and then copied into the docker context by the plugin.

from gradle-docker.

jsundqvist avatar jsundqvist commented on August 18, 2024

https://circleci.com/gh/jsundqvist/palantir-gradle-docker-issue-86/4
https://github.com/jsundqvist/palantir-gradle-docker-issue-86

from gradle-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.