Closed ghost closed 9 years ago
Hi! I am still in the process of writing proper documentation, and just now published a sample app: https://github.com/ficusio/openresty/tree/master/_example.
This image uses ONBUILD
hook that automatically copies everything from the nginx/
directory (located at the root of Docker build context, next to your Dockerfile
) to /opt/openresty/nginx/
. NginX is configured with that prefix path, and by default uses config file located at /opt/openresty/nginx/conf/nginx.conf
.
So, in order to get it working, you need to place NginX config in nginx/conf/nginx.conf
:
project_root/
├ nginx/ # all subdirs/files will be copied to /opt/openresty/nginx/
| ├ conf/
| | └ nginx.conf
| └ # any other files/dirs, e.g. html/
└ Dockerfile
And then use a Dockerfile
like this:
FROM ficusio/openresty:latest
EXPOSE 8080
Docker CMD
is set to nginx -g 'daemon off; error_log /dev/stderr info;'
, so it is launched in non-daemon mode and outputs error log to stderr
(to simplify log collection using tools like progruim/logspout). You can override this CMD
directive in your Dockerfile
if you wish to use different command-line args.
Makes sense. I'll kill my fork now as this is technically not a problem that needs to be solved.
Greetings!
I'm getting this error when I try to build my container
FROM ficusio/openresty:latest
and/orFROM ficusio/openresty:debian
.