Я пытаюсь создать образ с openresty: centos, и образ успешно создан, но при попытке запустить контейнер с этим изображением контейнер STOP и выдает следующее сообщение:
nginx: неверный параметр: "/bin / sh "
FROM openresty/openresty:1.11.2.3-centos
RUN yum install openssl-devel -y
RUN /usr/local/openresty/luajit/bin/luarocks install lua-cjson
RUN /usr/local/openresty/luajit/bin/luarocks install lua-resty-jwt
RUN /usr/local/openresty/luajit/bin/luarocks install lua-resty-redis
RUN /usr/local/openresty/luajit/bin/luarocks install luacrypto
RUN /usr/local/openresty/luajit/bin/luarocks install lualogging
RUN /usr/local/openresty/luajit/bin/luarocks install luaposix
RUN /usr/local/openresty/luajit/bin/luarocks install uuid
RUN PATH=/usr/local/openresty/nginx/sbin:$PATH
RUN export PATH
COPY ./src/api-gw/conf/nginx.conf /usr/local/openresty/nginx/conf
COPY ./src/api-gw/lib/authentication.lua /usr/local/openresty/lualib
COPY ./src/api-gw/lib/logger.lua /usr/local/openresty/lualib
COPY ./src/api-gw/lib/redis.lua /usr/local/openresty/lualib
COPY ./src/api-gw/lib/uses_cases.lua /usr/local/openresty/lualib
COPY ./src/api-gw/lib/utils.lua /usr/local/openresty/lualib
RUN mkdir /home/app
COPY ./src/api-gw/api-gw.lua /home/app
EXPOSE 80
CMD nginx -p /usr/local/openresty/nginx -c nginx.conf
команда для образа сборки:
docker build -t openresty_test .
команда для запуска контейнера:
docker run -it -p 8888:80 --name img_resty openresty_test
ответ:
nginx: invalid option: "/bin/sh"