-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker support based on Jib #19
base: master
Are you sure you want to change the base?
Conversation
I think you misunderstood this. What the above means is, if you want to pull down to your local Docker daemon the Image built and pushed to a remote registry, you would do Also, instead of the round-trip, you can directly push to your local Docker daemon by |
I finally took time to test 😉 I ran |
My bad. When you try to destroy the process, if the the reading stream is still open will prevent the process stop. I'll fix that. |
@jponge I take the opportunity to add a travis file (to fix the "it works on my machine" effect 😄 ) |
@@ -23,6 +23,11 @@ plugins { | |||
|
|||
repositories { | |||
jcenter() | |||
repositories { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nevermind, you do need it.
Going into src/test/gradle/vertx-web-sample
running gradle tasks
fails because of that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The com.google.cloud.tools:com.google.cloud.tools.jib.gradle.plugin
seems only present in mavenCentral and not jcenter.
The Gradle plugin portal is a mirror to jcenter and Maven Central thats why it works wit the this snippet.
The options I can see:
- Ask Google to publish the
jib-gradle-plugin
to jcenter (the jib maven plugin is already published). Do you know anyone able to do that? - Wait for the official publication, that will freeze this PR for a while
- Update the project build files to include
mavenCentral()
(cleaner than pointing the plugin portal)
repositories {
jcenter()
mavenCentral()
mavenLocal()
}
We should also update the documentation to explicit the need of Maven Central as a replacement/complement of JCenter.
WDYT?
The plugin may also manipulate the repositories declaration, and complete
if needed :-)
BTW JCenter always fetches from Maven Central when dependencies are missing.
…On Tue, Sep 11, 2018 at 11:00 PM Daniel PETISME ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In build.gradle
<#19 (comment)>
:
> @@ -23,6 +23,11 @@ plugins {
repositories {
jcenter()
+ repositories {
The com.google.cloud.tools:com.google.cloud.tools.jib.gradle.plugin seems
only present in mavenCentral
<https://mvnrepository.com/artifact/com.google.cloud.tools.jib/com.google.cloud.tools.jib.gradle.plugin?repo=gradle-plugins>
and not jcenter.
The Gradle plugin portal is a mirror to jcenter and Maven Central thats
why it works withe this snippet.
The options I can see:
- Ask Google to publish the jib-gradle-plugin to jcenter (the jib
maven plugin
<https://bintray.com/bintray/jcenter/com.google.cloud.tools%3Ajib-maven-plugin>
is already published). Do you know anyone able to do that?
- Wait for the official publication, that will freeze this PR for a
while
- Update the project build files to include mavenCentral() (cleaner
than pointing the plugin portal) and documentation to explicit the need of
Maven Central as a replacement/complement of JCenter.
WDYT?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABlaUiHeMOTlq8lCNE-IeTcbvepHPbeks5uaCSCgaJpZM4Vqx-v>
.
|
For the jib-gradle dependency it seems jcenter is not fallbacking to L'avenir Central... 😢 |
@jponge I tried to move on this one. I raised an issue to ask for the publication of the plugin as a dependency on the common repos: The I'm not sure this issue reflects a real-world situation. WDYT? For the plugin consistency, the issue can be fixed by adding |
Seems like we need to wait for GoogleContainerTools/jib#1004 right? |
Not sure, I understand that the core of jib will be published as a common lib aimed to be integrated in client code. The gralde plugin will use this core lib but not sure the plugin itself will be published on classic repos. Don't had time to dig it deeper and to be frank I don't know how to fix that in an elegant manner. Maybe you can tag this PR as "on-hold". |
val tag = if (project.version != Project.DEFAULT_VERSION) project.version else "latest" | ||
jibExtension.apply { | ||
from { imageConfiguration -> | ||
imageConfiguration.image = "openjdk:8-jdk-alpine" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imageConfiguration.image = "openjdk:8-jdk-alpine" | |
imageConfiguration.image = "openjdk:8-jre-alpine" |
I think 'jre' is what we need
A proposal for #18
It simply works (i used the
openjdk:8-jdk-alpine
as default image).My concerns with jib:
According to their FAQ the local build requires a weird
docker pull
to make the image available. We'll see the result on a CI environment. Plus, it requires to run thejibDockerBuild
rather than the simplejib
task.The docker build is 100% programatically, we can't override with a classic
Dockerfile
(discussed here. I understand the discussion but it's not ops-friendlyI wait for your feedback before starting the documentation.