File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM nginx
15
+ FROM nginx:latest
16
16
17
17
18
+ # Copy HTML and script files
18
19
COPY index2.html /usr/share/nginx/html/index2.html
19
- RUN chmod +r /usr/share/nginx/html/index2.html
20
20
COPY auto-reload-nginx.sh /home/auto-reload-nginx.sh
21
- RUN chmod +x /home/auto-reload-nginx.sh
22
21
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" ]
You can’t perform that action at this time.
0 commit comments