Task to create docker image

(amit panjiyar) #1

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 -Djava.security.egd=file:/dev/./urandom -jar /ap-test.jar”])

however while running the container i am getting error:- Unable to access jarfile /ap-test.jar. can anyone please help? i tried with the path ./ap-test.jar but still same issue.