I created a Dockerfile
FROM ubuntu:latest
as the parent image.
Later the Dockerfile creates a new group and user without sudo privileges via
RUN groupadd -r myappuser -g 433
RUN useradd -u 431 -r -g myappuser -d /opt/myapp -s /bin/false -c "my app user" myappuser
Before executing the application I switch to this new
USER myappuser
Question: Does this setting make it possible to gain root privileges again once the image is build and the container is running (with e.g. docker exec -it
)?