gradle-docker | Gradle plugin to build Docker images | Continuous Deployment library
kandi X-RAY | gradle-docker Summary
kandi X-RAY | gradle-docker Summary
If no base image is configured through the extension or task property a suitable image is chosen based on the project's targetCompatibility. A project targeting Java 7 will for instance get a default base image with a Java 7 runtime.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gradle-docker
gradle-docker Key Features
gradle-docker Examples and Code Snippets
Community Discussions
Trending Discussions on gradle-docker
QUESTION
Disclaimer: I aware the /var/run/docker.sock
issue is way common and there are lots of posts out there on it (although most if not all can be summed up to adding the running user to the docker permissions group). I tried all the those instructions and it still does not help me, in redhat.
I have two containers, one Ubuntu
and one running Redhat 7.9
.
My problem is specifically not being able to run - in the redhat container only - a call to Docker.Dotnet's ListImages
(fails with permission denied in /var/run/docker.sock
). In the beginning, I was not able to issue any docker command without prefixing it with sudo. I then added the running user to the docker permissions group, and can issue docker commands without sudo.
But Docker.Dotnet ListImages (which is simply a wrapper to docker api's images/json endpoint) still fails with the permission denied error on docker.sock. I tried all recommended here, to no avail.
I thought perhaps I should add the User=root (although this is not present in my Ubuntu service file, and therefore does not make much sense). I then realized that the ubuntu and redhat docker service files differ considerably.
Ubuntu:
...ANSWER
Answered 2021-Apr-04 at 08:16At the end... my problem was that in my Redhat installation, as opposed to my Ubuntu, we had SELinux enabled.
Disabling it finally had curl --unix-socket /run/docker.sock http://docker/images/json
working from within my composer containers.
To disable Selinux: edit (you may need to impersonate as root using sudo su root
) file /etc/selinux/config - replace SELINUX=enforcing
with SELINUX=disabled
Restart the linux server and that's it.
Remark: This may obviously not be an acceptable solution in a production environment. If this is your case, you will need to properly configure SELinux permissions settings. I was simply assigned a task to identify why this problem was happening in one of our dev machines, so disabling it suffices my needs for now.
QUESTION
I am trying to implement hibernate metamodel in my spring boot application. I am getting
...ANSWER
Answered 2020-Apr-20 at 16:40Got answer from below url and this will fixed my issue
QUESTION
I have a Gradle plugin implemented with Kotlin, which is built with a gradle kotlin DSL build script. This works fine. The build script is as follows and is located in the buildSrc directory of project:
...ANSWER
Answered 2020-Feb-14 at 11:24I think this is equivalent, though I think it just knocks Java out of the picture, so Groovy/Kotlin/Java buildSrc code won't work...:
QUESTION
I got an error after upgrading Spring Boot version from 2.1.11 to 2.2.4. Then I upgraded spring-cloud-starter-openfeign from 2.0.2 to 2.2.1, but it didn't help.
The following method did not exist:
...ANSWER
Answered 2020-Feb-06 at 06:33Have a look at the Javadoc for versions 2.1.11 and 2.2.4 respectively. The older version still exposes this method taking an int
argument but already states that it's deprecated and that you should use java.time.Duration
instead.
The method accepting java.time.Duration
still exists in 2.2.4 and you should use that one instead.
QUESTION
Gradle is running an experiment today, where they disable all HTTP communication: https://blog.gradle.org/decommissioning-http
Yesterday, I could sync my project just fine; I am not using a proxy or any other 'funky' setup.
...ANSWER
Answered 2019-Nov-15 at 13:31It may be related to your java version.
Gradle added support for TLSv3 on the 14.11.2019 (and disabled TLSv1.0) in plugins.gradle.org, and it seems that "old" Java versions have problems with it:
https://status.gradle.com/incidents/q2vq49fndxg0
For us it failed with 11.0.1, and we had to upgrade to 11.0.5
QUESTION
I have this .env file:
...ANSWER
Answered 2019-Oct-30 at 20:55One way to achieve your goal is to create ${PWD}/config/grade-docker.properties
file on the host where ${PWD}/docker-compose.yml
... ${PWD}
for clarity.
Your existing volumes
property will then map this file into the container when it's run and place it in the container's /config
.
QUESTION
I've followed the official spring boot docker for gradle tutorial, but I can't make it work.
My build.gradle
ANSWER
Answered 2019-Oct-17 at 13:09The app.jar
should be an executable jar
file but it is instead a directory. Because the JAR_FILE
is not set as build argument the COPY
instruction copies the content of the /build/docker
directory to the /app.jar
directory in the container. You can list it with:
QUESTION
In the logs, Zipkin status is coming as true but I can not see it in the Zipkin UI.
...ANSWER
Answered 2019-Oct-09 at 07:18I have a working project with spring cloud stream and zipkin using the following configuration (maybe you should set the sender.type):
QUESTION
So let me give some background on this before you start making assumptions. I have been facing a torturous process of debugging Gradle since I began working at my current place of employ. Collectively my coworkers and I have spent close to 20 hours trying different things to get Gradle to play nicely on my machine. It's finally to the point where it's completely halted my ability to work.
IMPORTANT NOTE: I am the only one who gets this error, and we are all using the exact same code, so the problem isn't here, but here is my build.gradle (minus redactions) for reference. My stacktrace will be below. Please help.
Gradle version: 5.6.2
IDE: IntelliJ (latest as of 9/30/19)
OS: Win 10 pro
...ANSWER
Answered 2019-Oct-01 at 16:16My gradle.properties file was missing with the username, PW, and URL. Replacing it with that information allowed me to import projects again and perform non-bootRun Gradle tasks.
It got deleted at some point before I reinstalled Gradle and I never replaced it due to panic that my Gradle wasn't working any longer.
Well, it's still not properly working, but I can import projects again, so I can at least get by with IntelliJ's compiler.
QUESTION
I currently have a gradle application and am using the gradle-docker plugin.
I have in my build.gradle file two Docker tasks, each that is supposed to tag an image for the appropriate Container Registry (specified by project.group) :
...ANSWER
Answered 2019-Sep-26 at 09:12The stuff you add in the closure for the task is applied when Gradle is configuring your tasks - not when actually running them. So in this case, you are defining two tasks, and both of them sets a shared property project.group
. So whatever task happens to be configured last "wins", no matter which one you actually intend to run.
There are many Docker plugins for Gradle available, and it looks to me like you use the one from Transmode. From the documentation, it appears you can't build two images with different Docker repository names in the same Gradle project. So I would say your options are to either set the name yourself after the image is built (e.g. in a doLast block), split it into two Gradle projects, or use another Docker plugin that is more customizable. The one from bmuschko is probably the most widely used and feature rich.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gradle-docker
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page