How to password protect a Docker image or a container?

This is my Dockerfile

FROM node:10.16.0-alpine

WORKDIR /usr/src/app

COPY package.json .

RUN npm install

COPY . .

EXPOSE 3333

CMD npm start

I just started out Docker and with this Dockerfile I can then build an image and use it in a container. Basic.

I want to add some securities in it. Maybe not letting any user do something like docker container exec -it my_container bash without entering a password?

Is there a way to require any user to enter a root password when doing docker container exec -it my_container bash? I want to protect the files inside it. Or maybe just require a password when creating a container with that image.

Suggestions would also be nice.

Any help would be much appreciated.

Source: StackOverflow