dockerfile: how use CMD or ENTRYPOINT from base image

If you left it blank in your new Dockerfile, it will inherit the one from the base image.

For example:

base

FROM ubuntu
CMD ["echo", "AAA"]

layer1

FROM base

If you build above images and run layer1 you will get the following:

$ sudo docker run -it layer1
AAA

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)