Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Component/s: docker-workflow-plugin
-
Labels:None
-
Similar Issues:
Description
I am getting error Angular project Dockerfile pipeline building details given below, solution to the problem appreciated-
#############
-
-
- build ###
#############
- 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
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
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
############# ### 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 |
Description |
############# ### 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 |
############# ### 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 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 |
Description |
############# ### 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 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 |
I am getting error Angular project Dockerfile pipeline building details given below, solution to the problem appreciated- ############# ### 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 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 |
Assignee | Nicolas De Loof [ ndeloof ] |
Component/s | docker-workflow-plugin [ 20625 ] | |
Component/s | docker-plugin [ 18724 ] |
Resolution | Cannot Reproduce [ 5 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |