hyperfk8s/docker/Dockerfile

13 lines
610 B
Docker
Executable File
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

FROM gong921123/debian-nginx-php114-74:latest
# 复制当前目录的所有 到上面容器的 var/www中去变成一个新的镜像
# 要想复制其他文件 就必须把dockerfile和其他文件放一起
# 这里复制了这个项目的所有
COPY . /var/www
# CMD不同于RUNCMD用于指定在容器启动时所要执行的命令而RUN用于指定镜像构建时所要执行的命令
# CMD只运行出现一次 多次出现只会执行最后一个
# 启动 hyperf 框架 并且 启动Nginx 服务器
#CMD ["php", "bin/hyperf.php", "start"]
CMD php bin/hyperf.php start && nginx -g 'daemon off;'