Gradle task to create docker image

Hello everyone,
I just started using gradle and docker. I am try to create docker image using below task:
task buildDocker(type: Docker, dependsOn: build) {
baseImage = 'openjdk:8-jdk-alpine’
copy {
from jar
into "${stageDir}"
rename { ‘ap-test.jar’ }
entryPoint([“sh”, “-c”, “java -jar /ap-test.jar”])

however while running the container i am getting error that /ap-test.jar can not be found. can anyone please help? i tried with the path ./ap-test.jar but still same issue.