autowarefoundation / autoware_ai

Apache License 2.0
27 stars 11 forks source link

Modify Autoware_AI Docker image and save it for not loose the content when building the container again. How? #773

Closed marcusvinicius178 closed 3 years ago

marcusvinicius178 commented 3 years ago

Hi I need to modify the a docker image from Autoware_AI repository after build it. The problem is:

A) I build the image running a .sh file:

cd $WORKING_DIRECTORY/docker/generic ./run.sh -t 1.14.0

It is specifically from Autoware: https://www.svlsimulator.com/docs/system-under-test/autoware-instructions/

B) I modify the scripts contained inside the packages contained in Autoware folder

C) When I exit the container, and later enter again the modifications are not there anymore, of coure, because the image is built from Dockerfile from scratch...

To find a solution I have tried 2 different approachs:

1)To modify the container and save it as described here: https://www.scalyr.com/blog/create-docker-image/

Issue: When using other terminal, trying to add .txt file for Autoware_AI running container, to modify the container, Autoware_AI container does not appear as active (but it is). Just other container are avaialable when I try to copy a file to Autoware_AI:

Commit Changes To a Docker image: https://phoenixnap.com/kb/how-to-commit-changes-to-docker-image

Issue: Problem to connect to Autoware_AI server and run the ros packages. This problem does not happen when building the original Docker file with .sh

The complete description of my problem as well as output of terminal attempts are better described here:

https://answers.ros.org/question/376512/fork-autoware_ai-repository-and-create-docker-image/?answer=376583#post-id-376583

https://get-help.robotigniteacademy.com/t/fork-autoware-ai-repository-and-create-docker-image/9533/4

I am kind of new in forking,changing docker images. I do not understand how to fix this, find a solution for create my custom docker image and make it functional.

I am sorry to post this question here as I am not sure if it is a confirmed bug. I have read: the communication rules: https://github.com/Autoware-AI/autoware.ai/wiki/Contributing-to-Autoware as well as support guideline: https://github.com/Autoware-AI/autoware.ai/wiki/Support-guidelines

For this reason I did not submit the question here at first. However I still was not answered in ROS, Stack Overflow and other forums. And I am almost sure an Autoware Developer can assist me quickly in this case with certain facility to help me develop my custom simulation based on my launch files and scripts. And unfortunately I am not able in this moment to save the modifications in the Autoware_AI container as I do easily in Autoware_Auto project. I am really stuck here.

Thanks very much in advance!

marcusvinicius178 commented 3 years ago

I have solved here. In my own answer:

https://answers.ros.org/question/376512/fork-autoware_ai-repository-and-create-docker-image/

I believe it is missing to update the documentation: https://github.com/Autoware-AI/autoware.ai/wiki/Generic-x86-Docker#run-an-autoware-docker-container

In case 2: image