Docker Community Forums

Share and learn in the Docker community.

When a build starts from DockerFile Flow is not going correct line

When a build starts from DockerFile Flow is not going the correct line.

Starting from 1 after that coming 13 steps after that going 5 it’s going randomly like that I’m sharing also image you can see from there if anyone had the same issue can share how I can fix what Is wrong :

Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '' to the list of known hosts.
Switched to a new branch 'staging'
Pulling cache layers for index.docker.io/nicolaskristoffersenhumanhotel/humanhotelbooking_application:staging...
Done!
KernelVersion: 4.4.0-1060-aws
Components: [{u'Version': u'19.03.8', u'Name': u'Engine', u'Details': {u'KernelVersion': u'4.4.0-1060-aws', u'Os': u'linux', u'BuildTime': u'2020-03-11T01:24:30.000000000+00:00', u'ApiVersion': u'1.40', u'MinAPIVersion': u'1.12', u'GitCommit': u'afacb8b7f0', u'Arch': u'amd64', u'Experimental': u'false', u'GoVersion': u'go1.12.17'}}, {u'Version': u'1.2.13', u'Name': u'containerd', u'Details': {u'GitCommit': u'7ad184331fa3e55e52b890ea95e65ba581ae3429'}}, {u'Version': u'1.0.0-rc10', u'Name': u'runc', u'Details': {u'GitCommit': u'dc9208a3303feef5b3839f4323d9beb36df0a9dd'}}, {u'Version': u'0.18.0', u'Name': u'docker-init', u'Details': {u'GitCommit': u'fec3683'}}]
Arch: amd64
BuildTime: 2020-03-11T01:24:30.000000000+00:00
ApiVersion: 1.40
Platform: {u'Name': u'Docker Engine - Community'}
Version: 19.03.8
MinAPIVersion: 1.12
GitCommit: afacb8b7f0
Os: linux
GoVersion: go1.12.17
Buildkit: Starting build for index.docker.io/nicolaskristoffersenhumanhotel/humanhotelbooking_application:staging...
WARNING: Support for the legacy ~/.dockercfg configuration file and file-format is deprecated and will be removed in an upcoming release
#1 importing cache manifest from index.docker.io/nicolaskristoffersenhumanh...
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 transferring context:
#2 transferring context: 2B done
#2 DONE 0.3s
#3 [internal] load build definition from Dockerfile
#3 transferring dockerfile: 3.59kB done
#3 DONE 0.4s
#4 [internal] load metadata for docker.io/library/debian:9
#4 DONE 0.2s
#5 [1/31] FROM docker.io/library/debian:9@sha256:8afcdd92f29e1706625631df94...
#5 DONE 0.0s
#23 [internal] load build context
#23 transferring context: 25.57MB 2.0s done
#23 DONE 2.1s
#12 [8/31] RUN service ssh restart
#12 CACHED
#19 [15/31] RUN npm -v
#19 CACHED
#21 [17/31] RUN npm install -g forever
#21 CACHED
#7 [3/31] RUN apt -y dist-upgrade
#7 CACHED
#13 [9/31] RUN apt install -y git
#13 CACHED
#25 [20/31] RUN apt -y install dos2unix
#25 CACHED
#26 [21/31] RUN dos2unix /home/humanhotel/.ssh/id_rsa
#26 CACHED
#20 [16/31] RUN npm install -g yarn
#20 CACHED
#6 [2/31] RUN apt update
#6 CACHED
#8 [4/31] RUN DEBIAN_FRONTEND=noninteractive
#8 CACHED
#9 [5/31] RUN apt-get install -y ssh
#9 CACHED
#11 [7/31] RUN echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
#11 CACHED
#14 [10/31] RUN apt install -y curl
#14 CACHED
#24 [19/31] COPY ./ssh/id_rsa /home/humanhotel/.ssh/id_rsa
#24 CACHED
#15 [11/31] RUN apt install -y make g++
#15 CACHED
#17 [13/31] RUN apt install -y nodejs
#17 CACHED
#18 [14/31] RUN node -v
#18 CACHED
#10 [6/31] RUN echo "Port 22" >> /etc/ssh/sshd_config
#10 CACHED
#16 [12/31] RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
#16 CACHED
#22 [18/31] RUN groupadd -r humanhotel && useradd -r -g humanhotel humanhote...
#22 CACHED
#27 [22/31] RUN apt -y --purge remove dos2unix
#27 CACHED
#28 [23/31] COPY ./code /home/humanhotel/code
#28 DONE 0.4s
#29 [24/31] WORKDIR /home/humanhotel/code
#29 DONE 0.0s
#30 [25/31] RUN npm install isomorphic-style-loader css-loader icheck
#30 0.780 /bin/sh: 1: npm: not found
#30 ERROR: executor failed running [/bin/sh -c npm install isomorphic-style-loader css-loader icheck]: runc did not terminate sucessfully
------
> [25/31] RUN npm install isomorphic-style-loader css-loader icheck:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c npm install isomorphic-style-loader css-loader icheck]: runc did not terminate sucessfully
Build failed using Buildkit

Screen Shot 2021-07-13 at 08.16.35|690x377