No `echo` Output in `RUN` Command

Given:

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

RUN echo "..."
RUN echo $FOO

Then I built it via docker build .:

  • How do I expose a UDP Port on Docker?
  • Application B is used by many client so which (Tools) will scale the B?
  • Is there a way to restrict untrusted container scheduler?
  • Which file stores the docker image dependencies?
  • Can't call btrfs send from another program
  • Is there whoami analog for Docker?
  • $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
    root@26d514890b3a:/# 
    

    Why don’t I see the two echo outputs?

  • Powershell Install-Package from Nuget
  • How to determine bridge IP of docker swarm container
  • Docker run without setting WORKDIR doesn't work
  • Docker container can't access nfs mount on Elastic Beanstalk host
  • Communication with Spark using Spark JobServer in docker
  • Issues with running a consul docker health check
  • 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.