dockerfile中ENTRYPOINT和CMD的关系
在使用Dockerfile构建镜像时,ENTRYPOINT和CMD都可以作为容器启动时的命令,下面是两个DockerFile
FROM ubuntu:22.04
ENTRYPOINT ["echo", "Hello"]
CMD ["World", "ChatGPT"]
CMD ["123", "ABC"]
输出:Hello 123 ABC
FROM ubuntu:22.04
ENTRYPOINT ["echo", "Hello"]
CMD ["World", "ChatGPT"]
输出:Hello World ChatGPT