Tag: 卢亚

在Docker中运行Lua脚本

我无法得到一个Lua脚本从Docker镜像运行。 我有一个非常简单的Lua脚本,我需要包含在图像中: function main(…) print("hello world") end 我创build了一个Dockerfile: FROM debian:latest RUN apt-get -y update && apt-get -y install lua5.1 lua-socket lua-sec ADD hello.lua /home/user/bin/hello.lua CMD ["/bin/sh", "-c", “lua /home/user/bin/hello.lua”] 但是当我尝试运行Docker镜像时,出现以下错误: /bin/sh: 1: [/bin/sh,: not found 有没有一个很好的解释,为什么我得到这个错误,以及如何运行Docker镜像时运行脚本。