Skip to content

Use non-root user and group in default for Docker images.#75

Merged
fujitatomoya merged 2 commits intorollingfrom
docker-image-non-root
Dec 4, 2025
Merged

Use non-root user and group in default for Docker images.#75
fujitatomoya merged 2 commits intorollingfrom
docker-image-non-root

Conversation

@fujitatomoya
Copy link
Owner

closes #70

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances Docker image security by switching from running containers as root to using a non-root user ros2ai. The changes update default workspace paths and user configurations across the Dockerfile and related scripts.

Key Changes:

  • Introduces non-root user ros2ai with configurable UID/GID in the Dockerfile
  • Updates default workspace path from /root/colcon_ws to /home/ros2ai/colcon_ws
  • Adds environment variables to README docker run example for better documentation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
docker/Dockerfile Creates non-root user with sudo privileges, updates workspace paths, and sets proper file ownership
scripts/docker_release.sh Updates paths to reference new non-root user's home directory and workspace location
README.md Adds OPENAI_ENDPOINT and OPENAI_MODEL_NAME environment variables to docker run command example

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@fujitatomoya
Copy link
Owner Author

@copilot can you approve this?

Copy link

Copilot AI commented Dec 4, 2025

@fujitatomoya I've opened a new pull request, #76, to work on those changes. Once the pull request is ready, I'll request review from you.

@fujitatomoya fujitatomoya reopened this Dec 4, 2025
@fujitatomoya fujitatomoya enabled auto-merge (squash) December 4, 2025 08:03
@fujitatomoya fujitatomoya disabled auto-merge December 4, 2025 08:03
@fujitatomoya fujitatomoya merged commit 8d0ec39 into rolling Dec 4, 2025
11 of 12 checks passed
@fujitatomoya fujitatomoya deleted the docker-image-non-root branch December 4, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker user id should not be root for security and misoperation

2 participants