Transmode / gradle-docker

A Gradle plugin to build Docker images from the build script.
Apache License 2.0
648 stars 142 forks source link

Presented samples don't work with version 1.2 #74

Open jest opened 8 years ago

jest commented 8 years ago

The examples presented e.g. in the documentation don't work. Specifically, the code

task docker(type: Docker) {
  applicationName = 'nginx'
  dockerfile {
      run 'echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list'
      run 'apt-get update'
      run 'apt-get install -y inotify-tools nginx apache2 openssh-server'
  }
}

fails on dockerfile because the DSL was not present(?) in 1.2.

mattgruter commented 8 years ago

Correct, sorry about that. I have changed the examples before we were ready to release version 1.3. Do you want me to revert the example code?

bjornmagnusson commented 8 years ago

There is also a 1.2 tag if you want to see the older stuff, which might show correct examples

jest commented 8 years ago

Yes, I know, but the example uses classpath 'se.transmode.gradle:gradle-docker:1.2' to load the plugin, so it simply doesn't work. And the error message doesn't help much to a newbie, so I think it is better to stick to a published version in a README file.

Or better yet, is there a published snapshot of master branch somewhere that one can use with new features? I see no published artifacts on droid.io -- maybe because the last few builds are failing?