This repository has been archived by the owner on Jan 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#9 Correcting extension section inside Readme.
- Loading branch information
Steffen Bleul
committed
Mar 4, 2017
1 parent
811df56
commit 05bd901
Showing
1 changed file
with
16 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
| Version | Tag | Dockerfile | | ||
|--------------|--------------|------------| | ||
| latest | latest | [Dockerfile](https://github.com/blacklabelops/nginx/blob/master/Dockerfile) | | ||
| 1.10.1-r1 | 1.10.1-r1| [Dockerfile](https://github.com/blacklabelops/nginx/blob/master/Dockerfile) | | ||
| 1.2 | 1.2 | [Dockerfile](https://github.com/blacklabelops/nginx/blob/master/Dockerfile) | | ||
|
||
# Features | ||
|
||
|
@@ -40,8 +40,7 @@ Example: | |
|
||
~~~~ | ||
$ docker run -d \ | ||
-v your_local_config_file.conf:/some/directory/nginx.conf \ | ||
-e "NGINX_CONFIG_FILE=/some/directory/nginx.conf" \ | ||
-v your_local_config_file.conf:/etc/nginx/nginx.conf \ | ||
-p 80:80 \ | ||
--name nginx \ | ||
blacklabelops/nginx | ||
|
@@ -462,52 +461,44 @@ Build the latest release with docker-compose: | |
$ docker-compose build | ||
~~~~ | ||
|
||
# Use Your Own Config File | ||
|
||
Just mount or place your file at the position `/home/nginx/config.json`! | ||
# How To Extend This Image | ||
|
||
Example: | ||
Minimal working example: | ||
|
||
~~~~ | ||
$ docker run -d \ | ||
-p 80:80 \ | ||
--name nginx \ | ||
-v config.json:/home/nginx/config.json \ | ||
blacklabelops/nginx | ||
~~~~ | ||
FROM blacklabelops/nginx | ||
> File config.json is your local configuration file. | ||
RUN echo "Install Your Tools" | ||
# How To Extend This Image | ||
# Optional: Your config file | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
~~~~ | ||
|
||
Minimal working example Dockerfile: | ||
Example with custom entrypoint: | ||
|
||
~~~~ | ||
FROM blacklabelops/nginx | ||
MAINTAINER Your Name <[email protected]> | ||
USER root | ||
RUN echo "Install Your Tools" | ||
USER nginx | ||
# Optional: Your config file | ||
COPY config.json /home/nginx/config.json | ||
COPY nginx.conf /etc/nginx/nginx.conf | ||
# Optional: Your entrypoint: | ||
COPY entrypoint.sh /opt/nginx-scripts/ | ||
ENTRYPOINT ["/opt/nginx-scripts/entrypoint.sh"] | ||
CMD ["nginx"] | ||
COPY entrypoint.sh /opt/nginx/ | ||
ENTRYPOINT ["/opt/nginx/entrypoint.sh"] | ||
~~~~ | ||
|
||
Minimal working example entrypoint `entrypoint.sh`: | ||
|
||
~~~~ | ||
#!/bin/bash -x | ||
#!/bin/bash | ||
# Your code | ||
echo My script code | ||
echo "My script code" | ||
# Then call image entrypoint | ||
exec /opt/nginx-scripts/docker-entrypoint.sh | ||
exec /opt/nginx/docker-entrypoint.sh | ||
~~~~ | ||
|
||
# Support | ||
|