$ docker run -d weseek/nginx-nchan- The container provides nginx on port 80 and the endpoint
/pubsubto publish/subscribe - See also: default.conf
Alternatively, a simple Dockerfile can be used to generate a new image that includes the necessary content (which is a much cleaner solution than the bind mount above):
FROM nginx
COPY /your-conf-directory/default.conf /etc/nginx/conf.d/Place this file in the same directory as your directory of content ("your-conf-directory"), run docker build -t my-nginx-nchan ., then start your container:
$ docker run -d my-nginx-nchan$ docker run -d -p 8080:80 my-nginx-nchanThen you can hit http://localhost:8080 or http://host-ip:8080 in your browser.
Check the reference of Official build of Nginx.