Skip to content

Commit 24c589d

Browse files
authored
Update Dockerfile
1 parent aa040a6 commit 24c589d

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

staging/https-nginx/Dockerfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM nginx
15+
FROM nginx:latest
1616

1717

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

23-
# install inotify
24-
RUN apt-get update && apt-get install -y inotify-tools
22+
# Set permissions and install inotify-tools in one layer
23+
RUN chmod 644 /usr/share/nginx/html/index2.html && \
24+
chmod +x /home/auto-reload-nginx.sh && \
25+
apt-get update && \
26+
apt-get install -y --no-install-recommends inotify-tools && \
27+
apt-get clean && \
28+
rm -rf /var/lib/apt/lists/*
29+
30+
# Override at kubernetes deployment template
31+
CMD ["./auto-reload-nginx.sh"]

0 commit comments

Comments
 (0)