FROM ubuntu:20.04 # Update and install necessary packages RUN apt-get update && \ apt-get install -y curl # Create a new user RUN useradd -m -s /bin/bash user && \ echo "user:user" | chpasswd # Switch to the new user USER user # Set the working directory WORKDIR /home/user # Add a script with the correct shebang RUN echo -e '#!/bin/bash\n' > /home/user/test.sh && \ echo 'echo "user" | su -c "echo Sudo is not working but su is!"' >> /home/user/test.sh && \ chmod +x /home/user/test.sh # Run the test script CMD ["/home/user/test.sh"]