Skip to content

https-nginx:Update Dockerfile #557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions staging/https-nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM nginx
FROM nginx:latest


# Copy HTML and script files
COPY index2.html /usr/share/nginx/html/index2.html
RUN chmod +r /usr/share/nginx/html/index2.html
COPY auto-reload-nginx.sh /home/auto-reload-nginx.sh
RUN chmod +x /home/auto-reload-nginx.sh

# install inotify
RUN apt-get update && apt-get install -y inotify-tools
# Set permissions and install inotify-tools in one layer
RUN chmod 644 /usr/share/nginx/html/index2.html && \
chmod +x /home/auto-reload-nginx.sh && \
apt-get update && \
apt-get install -y --no-install-recommends inotify-tools && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

WORKDIR /home
CMD ["./auto-reload-nginx.sh"]
2 changes: 1 addition & 1 deletion staging/https-nginx/nginx-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
selector:
app: nginx
---

apiVersion: v1
kind: ReplicationController
metadata:
Expand All @@ -37,7 +38,6 @@ spec:
containers:
- name: nginxhttps
image: ymqytw/nginxhttps:1.5
command: ["/home/auto-reload-nginx.sh"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though you're adding it to the dockerfile, it's generally a good practice to explicitly run a specific command. So I'd suggest leaving it here as is.

ports:
- containerPort: 443
- containerPort: 80
Expand Down