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 .:
$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
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.
ENTRYPOINT directives describe commands that will be executed when a container boots. Read the documentation for more details.