From 778043f281603d70f110c1e32600d6892759891c Mon Sep 17 00:00:00 2001 From: shadjachaudhari Date: Wed, 16 Jan 2019 15:49:45 +0530 Subject: [PATCH] uncomment lines to demo different outputs of CMD and ENTRYPOINT --- CMDVsEntrypointDemoDockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 CMDVsEntrypointDemoDockerfile diff --git a/CMDVsEntrypointDemoDockerfile b/CMDVsEntrypointDemoDockerfile new file mode 100644 index 0000000..94a0abf --- /dev/null +++ b/CMDVsEntrypointDemoDockerfile @@ -0,0 +1,16 @@ +FROM nginx:latest +RUN apt-get update && apt-get install vim telnet -y +# DEMO 1 +#ENTRYPOINT ["/bin/echo", "Hello"] +#CMD ["world"] +# DEMO 2 +#ENTRYPOINT ["/bin/echo", "Hello"] +#CMD ["world"] +# DEMO 3 +#ENV name sheldon +#ENTRYPOINT ["/bin/bash", "-c", "echo Hello, $name"] +#ENTRYPOINT ["/bin/echo", "Hello $name"] +#ENTRYPOINT echo hello $name +# DEMO 4 +ENTRYPOINT echo Hello +CMD ["world"] \ No newline at end of file