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 Dockerfile to simplify build process #40

Merged
merged 21 commits into from
Jul 17, 2024
Merged

Conversation

ruffsl
Copy link
Contributor

@ruffsl ruffsl commented Jul 8, 2024

No description provided.

Dockerfile Outdated Show resolved Hide resolved
msz-rai and others added 6 commits July 12, 2024 16:29
to demonstrate cmake issues
to demonstrate cmake issues
to demonstrate cmake issues
by relaxing normal build conventions
to demonstrate cmake issues
@ruffsl
Copy link
Contributor Author

ruffsl commented Jul 12, 2024

I've added a few more commits to demonstrate the issues with the existing CMake.

> docker build \
    --target=exporter \
    --output=build .
[+] Building 6.3s (12/14)                                                                                                                                  docker:default
 => [internal] load build definition from Dockerfile                                                                                                                 0.0s
 => => transferring dockerfile: 2.11kB                                                                                                                               0.0s
 => [internal] load metadata for docker.io/library/ros:jazzy                                                                                                         1.5s
 => [internal] load .dockerignore                                                                                                                                    0.0s
 => => transferring context: 210B                                                                                                                                    0.0s
 => [base 1/2] FROM docker.io/library/ros:jazzy@sha256:ee4862fe098e18eba8fb0e9843d57241e404aea12bcba57ed037827f16d98ba6                                              0.0s
 => [internal] load build context                                                                                                                                    0.0s
 => => transferring context: 1.53kB                                                                                                                                  0.0s
 => CACHED [base 2/2] RUN mv /etc/apt/apt.conf.d/docker-clean /etc/apt/ &&     echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";'       > /etc/apt/apt.conf.  0.0s
 => CACHED [prepper 1/3] WORKDIR /opt/rgl                                                                                                                            0.0s
 => CACHED [prepper 2/3] COPY package.xml src/RGLGazeboPlugin/package.xml                                                                                            0.0s
 => CACHED [prepper 3/3] RUN --mount=type=cache,sharing=locked,target=/var/cache/apt     rosdep install -y         --from-paths src         --ignore-src             0.0s
 => CACHED [builder 1/3] COPY . /tmp/RGLGazeboPlugin                                                                                                                 0.0s
 => CACHED [builder 2/3] RUN --mount=type=cache,target=src/,rw     cp -r /tmp/RGLGazeboPlugin src/RGLGazeboPlugin                                                    0.0s
 => ERROR [builder 3/3] RUN --mount=type=cache,target=src/,ro     . /opt/ros/jazzy/setup.sh &&     colcon build                                                      4.6s
------                                                                                                                                                                    
 > [builder 3/3] RUN --mount=type=cache,target=src/,ro     . /opt/ros/jazzy/setup.sh &&     colcon build:                                                                 
0.882 WARNING: Package name "RGLGazeboPlugin" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.                                                                                                                                                
0.918 Starting >>> RGLGazeboPlugin                                                                                                                                        
4.342 --- stderr: RGLGazeboPlugin                                                                                                                                         
4.342 CMake Error at RGLServerPlugin/CMakeLists.txt:47 (file):
4.342   file DOWNLOAD cannot open file for write.
4.342 
4.342 
4.342 ---
4.342 Failed   <<< RGLGazeboPlugin [3.42s, exited with code 1]
4.400 
4.400 Summary: 0 packages finished [3.60s]
4.400   1 package failed: RGLGazeboPlugin
4.400   1 package had stderr output: RGLGazeboPlugin
------
Dockerfile:38
--------------------
  37 |     
  38 | >>> RUN --mount=type=cache,target=src/,ro \
  39 | >>>     . /opt/ros/$ROS_DISTRO/setup.sh && \
  40 | >>>     colcon build
  41 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c . /opt/ros/$ROS_DISTRO/setup.sh &&     colcon build" did not complete successfully: exit code: 1

Note: reverting 3f69342 will not produce the expected built output, but avoids violating the expected CMake/colcon norms.

@ruffsl ruffsl changed the base branch from main to fix/separate-external-project July 15, 2024 17:11
@ruffsl ruffsl marked this pull request as ready for review July 15, 2024 17:14
@ruffsl ruffsl requested a review from msz-rai July 15, 2024 17:15
Copy link
Contributor

@msz-rai msz-rai left a comment

Choose a reason for hiding this comment

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

LGTM!
Thank you for your contribution.
Since #42 has been merged, please change the base branch to main. I will merge it then.

@ruffsl ruffsl changed the base branch from fix/separate-external-project to main July 16, 2024 14:15
@ruffsl
Copy link
Contributor Author

ruffsl commented Jul 16, 2024

please change the base branch to main.

Done!

@msz-rai msz-rai merged commit 657b12d into RobotecAI:main Jul 17, 2024
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