Since the container ports are exposed to internet 24*7, it could be possible that the container get compromised. Then the hacker could run tcpdump or arp-scan to get more info on the network.
Is it possible to add that in the docker file, like following?
# Add a new user "john" with user id 8877
RUN useradd -u 8877 john
# Change to non-root privilege
USER john
Since the container ports are exposed to internet 24*7, it could be possible that the container get compromised. Then the hacker could run tcpdump or arp-scan to get more info on the network.
Is it possible to add that in the docker file, like following?