Bad command issued for CMD as array
Closed this issue · 2 comments
slobo commented
Having trouble running the official nginx image with 0.16.2. Worked at some point before, 0.15 for sure.
Azkfile.js
"www": {
image: {docker: 'nginx'},
mounts: {
'/usr/share/nginx/html': path('www'),
},
http: { domains: [ "#{system.name}.#{manifest.dir}.#{azk.default_domain}" ] },
ports: { http: '80/tcp' },
},
Official Nginx Dockerfile (https://github.com/nginxinc/docker-nginx/blob/master/Dockerfile)
FROM debian:jessie
MAINTAINER NGINX Docker Maintainers "docker-maint@nginx.com"
RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
RUN echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list
ENV NGINX_VERSION 1.9.7-1~jessie
RUN apt-get update && \
apt-get install -y ca-certificates nginx=${NGINX_VERSION} && \
rm -rf /var/lib/apt/lists/*
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
VOLUME ["/var/cache/nginx"]
EXPOSE 80 443
CMD ["nginx", "-g", "daemon off;"]
$ azk start www
azk: Run system `www` return: (1), for command: ["/bin/sh","-c","nginx -g daemon off;"]:
azk: .www [log] > nginx: invalid option: "off"
If I add this to system definition:
command: 'nginx -g "daemon off;"',
Then it all goes ok since daemon off;
gets properly passed to nginx as a single argument.
Is there even a need for azk to mangle the command
when CMD
is already specified?
gullitmiranda commented
slobo commented
Great, thanks for quick response