Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does #(nop) mean in docker history?

Tags:

docker

What does the #(nop) prefix mean when listing docker history?

$ docker history swarm IMAGE               CREATED             CREATED BY    c54bba046158        9 days ago          /bin/sh -c #(nop) CMD ["--help"] 
like image 641
user3313834 Avatar asked Dec 23 '16 09:12

user3313834


People also ask

What does the fox say Meaning?

Speaking of the meaning of the song, Vegard characterizes it as coming from "a genuine wonder of what the fox says, because we didn't know". Although interpreted by some commentators as a reference to the furry fandom, the brothers have stated they did not know about its existence when producing "The Fox".

What does the fox say for real?

One of the most common fox vocalizations is a raspy bark. Scientists believe foxes use this barking sound to identify themselves and communicate with other foxes. Another eerie fox vocalization is a type of high-pitched howl that's almost like a scream.

What Does the Fox Say producers?

The Fox (What Does The Fox Say?) Originally conceived as an "anti-hit" that would be a one-time joke on their show, Ylvis collaborated on the song with fellow Norwegians Stargate, the songwriting and production team of Tor Erik Hermansen and Mikkel Storleer Eriksen.


1 Answers

NOP stands for "no operation".

Docker runs a shell for every layer. All the docker commands (or layers) in the Dockerfile except the RUN command show up in the history as empty or commented out shell commands. The # sign marks the start of the comment and anything after that will be skipped by the /bin/sh. Similarly if you typing in the terminal:

user@machine $ echo hello world hello world user@machine $ #But none of these lines starting with # do anything user@machine $ #echo hello world 

The non-RUN commands will not need to be interpreted by the shell, but instead are processed by docker internally.

The history (including the non-RUN commands) can be used by the layer cache to skip processing in case the same command has been run previously.

like image 194
Rots Avatar answered Oct 11 '22 00:10

Rots