Skip to content
This repository has been archived by the owner on Jan 3, 2018. It is now read-only.

entrypoint doesn't seem to work as expected #1

Open
skyl opened this issue Nov 18, 2014 · 3 comments
Open

entrypoint doesn't seem to work as expected #1

skyl opened this issue Nov 18, 2014 · 3 comments

Comments

@skyl
Copy link

skyl commented Nov 18, 2014

The image on the docker hub registry does not run:

docker run -it tenstartups/openresty         
nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)

Indeed, there is nothing in /etc/nginx:

docker run -it tenstartups/openresty /bin/bash
root@67b0d409f4ea:/opt/openresty# ls /etc/nginx/
root@67b0d409f4ea:/opt/openresty# 

More:

root@67b0d409f4ea:/opt/openresty# ps
  PID TTY          TIME CMD
    1 ?        00:00:00 entrypoint
   11 ?        00:00:00 bash
   13 ?        00:00:00 ps
root@67b0d409f4ea:/opt/openresty# ./entrypoint 
root@67b0d409f4ea:/opt/openresty# ps
  PID TTY          TIME CMD
    1 ?        00:00:00 entrypoint
   11 ?        00:00:00 bash
   16 ?        00:00:00 ps
root@67b0d409f4ea:/opt/openresty# ls /etc/nginx/
root@67b0d409f4ea:/opt/openresty# 

Any ideas?

@marclennox
Copy link
Contributor

Hi @skyl. My apologies, I had setup this docker for my own projects, where I use a bind-mount to provide the nginx configuration file. But you are absolutely correct, the docker should work on its own and provide a default configuration.

I will try to get this resolved, or else feel free to submit a pull request for it.

Thanks.

@coopernurse
Copy link
Contributor

I'm not sure what entrypoint's current if test is trying to do, but changing it to this seems to work fine:

if ! [ -f /etc/nginx/nginx.conf ]; then  

If that's acceptable I can open a PR for it.

@marclennox
Copy link
Contributor

Please do. I actually can't explain the current if test! :)

coopernurse added a commit to coopernurse/openresty-docker that referenced this issue Apr 6, 2015
coopernurse added a commit to coopernurse/openresty-docker that referenced this issue Apr 6, 2015
marclennox added a commit that referenced this issue Apr 6, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants