Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker Support to open_manipulator #266

Merged
merged 2 commits into from
Feb 3, 2025
Merged

Add Docker Support to open_manipulator #266

merged 2 commits into from
Feb 3, 2025

Conversation

Woojin-Crive
Copy link
Contributor

Description

This pull request merges the support-docker branch into the main branch, introducing Docker support to the open_manipulator project. The changes in this branch aim to simplify the setup process and streamline the development environment through containerization.

Summary of Changes

  • Dockerfile and docker-compose configuration file Added:
    A new Dockerfile is provided to build a containerized environment for open_manipulator. This ensures that users can quickly and consistently set up the required build environment.

Motivation

Many users and contributors have expressed interest in a containerized setup that can simplify dependency management and environment configuration. By integrating Docker support, we reduce setup time and increase the reproducibility of builds and tests. This change helps new contributors get started quickly and makes the project more accessible.

Testing & Validation

  • Local Testing:
    The Docker container was built and run locally, and all essential functionalities were verified within the containerized environment.

Request for Review

Please review the changes and provide any feedback or suggestions. Your input is welcome to ensure that this new workflow integrates smoothly with our ongoing development process.

Copy link
Contributor

@sunghowoo sunghowoo left a comment

Choose a reason for hiding this comment

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

The EOF is misplaced in the file. It should be at the very end.

@Woojin-Crive
Copy link
Contributor Author

Woojin-Crive commented Feb 3, 2025

EOF is now placed at the end of the files.

Copy link
Contributor

@sunghowoo sunghowoo left a comment

Choose a reason for hiding this comment

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

LGTM

@sunghowoo
Copy link
Contributor

@Woojin-Crive We were considering support for Docker this year, so thanks for writing it in advance!

@sunghowoo sunghowoo merged commit 14fd4f5 into main Feb 3, 2025
1 check passed
@Woojin-Crive Woojin-Crive deleted the support-docker branch February 3, 2025 05:28
@Woojin-Crive
Copy link
Contributor Author

Woojin-Crive commented Feb 3, 2025

Usage Examples for Docker Support

  • Allow Local Docker Access to the X Server:
    To enable GUI applications to connect from within the Docker container, run:

    xhost +local:docker
    
  • Starting the Container:
    Run the following command to start the container in detached mode:

    docker compose up -d
    

    This command will build (if necessary) and start all defined services in the background.

  • Accessing the Container Shell:
    Once the container is running, you can open a bash shell within the service (assuming the service name is ros2):

    docker compose exec ros2 bash
    

    This allows you to interact directly with the container’s environment.

  • Stopping and Removing Containers:
    To stop and remove the running containers when you’re done, use:

    docker compose down
    

    This will stop the services and clean up the associated resources.

  • Viewing Container Logs (Optional):
    For debugging or monitoring, you can stream the logs with:

    docker compose logs -f
    

These examples should help users get started quickly with the containerized environment provided by the Docker support.
Since the repository README does not currently include instructions for running the package, I am adding this comment as a note to be incorporated into the e-manual in the future. Using a containerized environment can help prevent the classic "it works on my machine" issue.

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.

2 participants