Context
The Dockerfile at examples/02_remote_agent_server/06_custom_tool/Dockerfile does not currently specify a USER directive, so the container runs as root by default.
Best practice
It is a Docker best practice to run containers as a non-root user. Adding a USER directive with a non-root user avoids unnecessary privilege and follows community conventions for well-formed Dockerfiles.
Suggested change
Add a non-root user to the Dockerfile, e.g.:
RUN useradd -m appuser
USER appuser
Or use an existing non-root user if one is already created in the base image.
Acceptance criteria
Context
The Dockerfile at
examples/02_remote_agent_server/06_custom_tool/Dockerfiledoes not currently specify aUSERdirective, so the container runs asrootby default.Best practice
It is a Docker best practice to run containers as a non-root user. Adding a
USERdirective with a non-root user avoids unnecessary privilege and follows community conventions for well-formed Dockerfiles.Suggested change
Add a non-root user to the Dockerfile, e.g.:
Or use an existing non-root user if one is already created in the base image.
Acceptance criteria
USERdirective with a non-root user