memex-in commited on
Commit
a57ffa2
·
verified ·
1 Parent(s): e7dccbd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -4,13 +4,18 @@ FROM docker:dind-rootless
4
  # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
- # Copy the Nginx app's index.html and its Dockerfile (now named exdocker) into this container
8
  COPY index.html ./
9
  COPY exdocker ./
10
 
11
- # Install curl to test the inner Nginx server
 
12
  RUN apk add --no-cache curl
13
 
 
 
 
 
14
  # Expose a port from this DinD container.
15
  # We'll map the inner Nginx container's port 80 to this port (e.g., 8080)
16
  # within the DinD container. Then, we can map this 8080 to the host.
 
4
  # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
+ # Copy the Nginx app's index.html and its Dockerfile (exdocker) into this container
8
  COPY index.html ./
9
  COPY exdocker ./
10
 
11
+ # Switch to root user to install curl, as apk requires root privileges
12
+ USER root
13
  RUN apk add --no-cache curl
14
 
15
+ # Switch back to the default non-root user for dind-rootless (usually 'docker')
16
+ # This is important for security and proper operation of the rootless daemon
17
+ USER docker
18
+
19
  # Expose a port from this DinD container.
20
  # We'll map the inner Nginx container's port 80 to this port (e.g., 8080)
21
  # within the DinD container. Then, we can map this 8080 to the host.