No `echo` Output in `RUN` Command


$cat Dockerfile
FROM java:openjdk-8u72-jdk 

RUN echo "..."
RUN echo $FOO

Then I built it via docker build .:

  • Dockerfile vs docker run
  • Pandoc HTML to DOCX images load locally but not on server
  • How can I restart a docker image instead of restarting docker?
  • Does sbt-native-package docker plugin support to create a tag
  • Dockerfile: How to replace a placeholder in environment variable with build-arg's?
  • How to move Docker containers to AWS
  • $docker images
    REPOSITORY          TAG                 IMAGE ID            CREATED              VIRTUAL SIZE
    <none>              <none>              sha256:02914        About a minute ago   642.8 MB
    java                openjdk-8u72-jdk    sha256:081ce        3 days ago           642.8 MB

    But, when I run it, I don’t see any echo:

    $docker run -it -e FOO='bar' sha256:02914

    Why don’t I see the two echo outputs?

  • hive on spark, always wrong executor_cores in job application from spark master web UI
  • Unable to install Npsql via nuget
  • Docker build image 1GB or too big
  • Node.js web application not running properly in Docker stack
  • Docker: Why is /etc/resolv.conf unreadable? Breaks DNS [closed]
  • How to disallow push to docker repository
  • One Solution collect form web for “No `echo` Output in `RUN` Command”

    RUN commands in your Dockerfile execute as part of the docker build process. They are for making changes to the image that you are creating. They are not executed when you start a container from the resulting image.

    The CMD and ENTRYPOINT directives describe commands that will be executed when a container boots. Read the documentation for more details.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.