realipaduser commited on
Commit
b2c7186
·
verified ·
1 Parent(s): 6633832

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -2
Dockerfile CHANGED
@@ -14,8 +14,9 @@ USER user
14
  # Set the working directory
15
  WORKDIR /home/user
16
 
17
- # Add a script to switch to root and execute a command
18
- RUN echo 'echo "user" | su -c "echo Sudo is not working but su is!"' > /home/user/test.sh && \
 
19
  chmod +x /home/user/test.sh
20
 
21
  # Run the test script
 
14
  # Set the working directory
15
  WORKDIR /home/user
16
 
17
+ # Add a script with the correct shebang
18
+ RUN echo -e '#!/bin/bash\n' > /home/user/test.sh && \
19
+ echo 'echo "user" | su -c "echo Sudo is not working but su is!"' >> /home/user/test.sh && \
20
  chmod +x /home/user/test.sh
21
 
22
  # Run the test script