How to generate a docker image

I try to create a docker image based on my java gradle web application.
I add plugin and build in my build.gradle as shown below.

apply plugin: 'application'
apply plugin: 'docker'

buildscript {
  repositories { mavenCentral() }
  dependencies {
    classpath 'se.transmode.gradle:gradle-docker:1.1'
  }
}

I didn’t specify the java version as in gradle’s default sourceCompatibility is 1.7

After execute ./gradlew distDocker
build folder is generated

docker/application-b35a946bf5b.tgz
docker/Dockerfile
classes/
distributions/
libs/
resources/
scripts/
tmp/

Can i create docker images based on docker/application-b35a946bf5b.tgz and docker/Dockerfile

I am new to docker.

Any suggestion will be helpful.

Source: StackOverflow