forked from RedHatTraining/DO288-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update of hello-world-nginx image for UBI
- Loading branch information
Student User
committed
Jun 26, 2019
1 parent
9b71dda
commit c088084
Showing
3 changed files
with
29 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM registry.access.redhat.com/ubi8:8.0 | ||
|
||
RUN yum install -y --disableplugin=subscription-manager --nodocs nginx \ | ||
&& yum clean all | ||
|
||
ADD index.html /usr/share/nginx/html | ||
|
||
ADD nginxconf.sed /tmp/ | ||
RUN sed -i -f /tmp/nginxconf.sed /etc/nginx/nginx.conf | ||
|
||
RUN touch /run/nginx.pid \ | ||
&& chgrp -R 0 /var/log/nginx /run/nginx.pid \ | ||
&& chmod -R g+rwx /var/log/nginx /run/nginx.pid | ||
|
||
EXPOSE 8080 | ||
USER 1001 | ||
|
||
CMD nginx -g "daemon off;" | ||
|
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<html> | ||
<body> | ||
<h1>Hello, world from nginx!</h1> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
s/listen 80/listen 8080/ | ||
s/listen \[::\]:80/listen \[::\]:8080/ | ||
s/user nginx;// | ||
s%error_log /var/log/nginx/error.log%error_log stderr% | ||
s%access_log /var/log/nginx/access.log main;%% |