-
Notifications
You must be signed in to change notification settings - Fork 86
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
Commit from container error vnc #131
Comments
Hi @lmontagnon, not the maintainer. Just a fellow user like you and I have at least managed to get it working. Not exactly sure what the cause of the issue here is just based on the terminal output you have provided. However, following the exact steps listed below got it working for me. Maybe you can give it a try and see if it works for you as well: Environment 📑
Steps To Reproduce 🔨1. Download repository:cd $HOME
git clone https://github.com/Tiryoh/docker-ros2-desktop-vnc.git --depth 1 --single-branch 2. Build
|
Hi @cardboardcode , Thank you for your reply ! The build from source and run the container it's already working for me. The problem is when I commit the container created once the work is finished inside and I want to relaunch this new image I get this error. How to reproduce
Can you try this and tell me if you have same issue ? I will add "How to reproduce" on my first comment. |
Ah I get it now. Thank you @lmontagnon for clarifying further. Will try and update accordingly since I wish to do the same myself. |
Tried it. Encountered the same issue as original thread author. Environment
Steps To Reproduce 🔨1. Download repository:cd $HOME
git clone https://github.com/Tiryoh/docker-ros2-desktop-vnc.git --depth 1 --single-branch 2. Build
|
@lmontagnon Did a bit of debugging. Still can't determine the root cause but narrowed down the issue and figured out a dirty workaround. UpdateThe cause of issue seems to be specifically due to: Running the following command in line 350 of exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf The program [program:vnc]
command=gosu '$USER' bash '$VNCRUN_PATH' Tried having the command run in verbose to give more info about the unexpected error causing Dirty Workaround 🩹While I can't have You can follow the steps below to manually commit the docker container and run the VNC server based on the new docker image: Instructions
...
# exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf
/bin/bash
docker buildx build --platform=linux/amd64 --progress=plain -t tiryoh/ros2-desktop-vnc:humble-amd64 .
docker run -it -p 6080:80 --security-opt seccomp=unconfined --shm-size=512m tiryoh/ros2-desktop-vnc:humble-amd64
# Inside Docker Container
cd /home/ubuntu/Desktop
mkdir NEW_CHANGES.txt
docker commit <container_id> my_new_image:1
docker run -it -p 6080:80 --security-opt seccomp=unconfined --shm-size=512m my_new_image:1
# Within Docker Container
ls /home/ubuntu/Desktop You should see
gosu $USER bash $HOME/.vnc/vnc_run.sh -v
docker exec -it <container_id> bash
gosu $USER bash -c "websockify --web=/usr/lib/novnc 80 localhost:5901"
You should be able to access the VNC server now based on the new commited docker image. Remarks 💬Still unable to deduce the root cause and have |
Thanks for pointing this out! I'm still checking, but maybe this comment is relevant. |
Hi @Tiryoh, no worries. Thank you for replying. 😊 Will try logging out before stopping the container and update if this addresses the issue. |
Hi @cardboardcode , @Tiryoh , I tried logging out before commit and it seems to work! When I reproduce the same commands (step to reproduce) it works! Thanks for your help, lmontagnon |
@Tiryoh @lmontagnon Solution ✨Before stopping to commit docker container to new docker image, log out first. |
Great! Thank you for your research and thank you for sharing it with us! |
@Tiryoh Not quite sure what is the purpose of the screenshot/note you attached above. Can you elaborate further? For now, it is just a screenshot with information that the root |
@cardboardcode I am thinking of adding "docker commit instructions" to the README as well as the console message above until the issue is resolved. |
@Tiryoh Ah I see. Apologies. I didn't notice it the first time. I think the |
@cardboardcode Thanks a lot for getting back to me with your thoughts. Really appreciate it! 🙏 |
excuse me, could you explain how to logout? edit: oh I got it. You mean by using the log out button from desktop |
Hi @SaadRana17, Thank you for the detailed report! I'll check it out as well. |
Hello and thanks for your job !
I have a question : when do you have finish with my container made from your image (tiryoh/ros2-desktop-vnc:humble) how to commit correctly my docker container with vnc ? because i have some issue when i commit and run the new image :
useradd: user 'ubuntu' already exists
set default password to "ubuntu"
source /opt/ros/humble/setup.bash
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash
============================================================================================
NOTE: --security-opt seccomp=unconfined flag is required to launch Ubuntu Jammy based image.
See feat: Add ROS 2 Humble Dockerfile #56
============================================================================================
2024-01-25 14:25:19,861 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2024-01-25 14:25:19,861 INFO Set uid to user 0 succeeded
2024-01-25 14:25:19,872 INFO RPC interface 'supervisor' initialized
2024-01-25 14:25:19,872 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2024-01-25 14:25:19,873 INFO supervisord started with pid 37
2024-01-25 14:25:20,877 INFO spawned: 'novnc' with pid 38
2024-01-25 14:25:20,880 INFO spawned: 'vnc' with pid 39
2024-01-25 14:25:21,104 INFO exited: vnc (exit status 1; not expected)
2024-01-25 14:25:22,286 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-01-25 14:25:22,288 INFO spawned: 'vnc' with pid 60
2024-01-25 14:25:22,425 INFO exited: vnc (exit status 1; not expected)
2024-01-25 14:25:24,430 INFO spawned: 'vnc' with pid 69
2024-01-25 14:25:24,525 INFO exited: vnc (exit status 1; not expected)
2024-01-25 14:25:27,531 INFO spawned: 'vnc' with pid 78
2024-01-25 14:25:27,626 INFO exited: vnc (exit status 1; not expected)
2024-01-25 14:25:28,628 INFO gave up: vnc entered FATAL state, too many start retries too quickly
How to reproduce
run build docker container of tiryoh/ros2-desktop-vnc:humble-amd64
docker run -p 6080:80 --security-opt seccomp=unconfined --shm-size=512m tiryoh/ros2-desktop-vnc:humble-amd64
make some change inside it, stop it (ctrl+c) and commit the container
docker commit 766f3e47cf4b lmontagnon/testimagevnc:v1
Relaunch step 1. but with my new image lmontagnon/testimagevnc:v1
docker run -p 6080:80 --security-opt seccomp=unconfined --shm-size=512m lmontagnon/testimagevnc:v1
I'm using ubuntu 22.04 LTS and docker version 25.0.3
Thank you for your help,
lmontagnon
The text was updated successfully, but these errors were encountered: