Skip to content

Commit

Permalink
tested docker entrypoint on container
Browse files Browse the repository at this point in the history
  • Loading branch information
Arief-AK committed May 28, 2024
1 parent 13534fd commit 3fab8f6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/container/container_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def menu():
choice = int(input("\nChoice (1 - 3): "))

if choice == 1:
os.system(". $SARAX_WS/PX4-Autopilot/sarax_plus_sitl.bash")
os.system("cd $SARAX_WS/PX4-Autopilot && ./sarax_plus_sitl.bash")
elif choice == 2:
os.system("roslaunch m4e_mani_base sarax_plus_sitl.launch")
elif choice == 3:
Expand Down
2 changes: 2 additions & 0 deletions scripts/container/docker_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash

echo "Running SARAX CLI application"

cd $SARAX_WS/src/sarax/scripts/container
python3 container_menu.py
3 changes: 3 additions & 0 deletions scripts/docker_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ fi
if [ $OPTION = 'Start' ]; then
echo -e "\nStarting Docker container"
docker start $CONTAINER_NAME
echo -e "\nEntering Docker container"
COMMAND="docker exec -it sarax_container bash"
open_new_terminal "$COMMAND"
fi

if [ $OPTION = 'Stop' ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def docker_config(system:str):
print("4. List images")
print("5. Download image")
print("6. Run container")
print("7. Start container")
print("7. Start container (start another instance of the container)")
print("8. Stop container")
print("9. Remove container")
print("0. Exit")
Expand Down

0 comments on commit 3fab8f6

Please sign in to comment.