[JIRA] (JENKINS-59175) java.io.IOException: Cannot retrieve .Id from 'docker inspect node:latest AS build-env'

8 views
Skip to first unread message

sumantakarmakar07@gmail.com (JIRA)

unread,
Sep 2, 2019, 2:47:03 AM9/2/19
to jenkinsc...@googlegroups.com
Sumanta Karmakar created an issue
 
Jenkins / Bug JENKINS-59175
java.io.IOException: Cannot retrieve .Id from 'docker inspect node:latest AS build-env'
Issue Type: Bug Bug
Assignee: Nicolas De Loof
Components: docker-plugin
Created: 2019-09-02 06:46
Priority: Major Major
Reporter: Sumanta Karmakar
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

sumantakarmakar07@gmail.com (JIRA)

unread,
Sep 2, 2019, 2:51:02 AM9/2/19
to jenkinsc...@googlegroups.com
Sumanta Karmakar updated an issue
Change By: Sumanta Karmakar
#############
### build ###
#############

# base image
# FROM node:latest as builder
FROM node:latest AS build-env


# Creating app directory in Docker server
# mkdir /app

# set working directory
WORKDIR /app

# add `/app/node_modules/.bin` to $PATH
# ENV PATH /app/node_modules/.bin:$PATH

# install and cache app dependencies
COPY package.json /app/package.json

# install and cache app dependencies
RUN npm install

# add app
COPY . /app

# run tests
# RUN ng test --watch=false
# run e2e test
# RUN ng e2e --port 4202

# generate build
RUN npm run build -- --output-path=./dist

# copy artifact build from the 'build environment'
COPY --from=build-env /app/dist  .

I am getting error :

 

Removing intermediate container f3c2c71b3482 Successfully built a26ef673d681 Successfully tagged koreatrade_dev_web:latest [Pipeline] dockerFingerprintFrom [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline *java.io.IOException: Cannot retrieve .Id from 'docker inspect node:latest AS build-env' at* org.jenkinsci.plugins.docker.workflow.client.DockerClient.inspectRequiredField(DockerClient.java:220) at org.jenkinsci.plugins.docker.workflow.FromFingerprintStep$Execution.run(FromFingerprintStep.java:133) at org.jenkinsci.plugins.docker.workflow.FromFingerprintStep$Execution.run(FromFingerprintStep.java:85) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47) at hudson.security.ACL.impersonate(ACL.java:290) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:267) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1143) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:618) at java.lang.Thread.run(Thread.java:785) Finished: FAILURE

 

sumantakarmakar07@gmail.com (JIRA)

unread,
Sep 2, 2019, 2:55:02 AM9/2/19
to jenkinsc...@googlegroups.com

I tried
# base image
# FROM node:latest as builder
FROM node as base

and

# copy artifact build from the 'build environment'
COPY --from=0 /app/dist   .

Is giving error like :
Step 7/7 : COPY --from=0 /app/dist .
invalid from flag value 0: refers to current build stage

[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 1
Finished: FAILURE


 

sumantakarmakar07@gmail.com (JIRA)

unread,
Sep 2, 2019, 2:57:03 AM9/2/19
to jenkinsc...@googlegroups.com
Sumanta Karmakar updated an issue
I am getting error Angular project  Dockerfile pipeline building details given below, solution to the problem appreciated-

nicolas.deloof@gmail.com (JIRA)

unread,
Sep 2, 2019, 3:59:02 AM9/2/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages