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"]
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".
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With