NESTLab / 2122_MultiDroneIndoorSLAM

Code for 21/22 MQP and DRs on Multi Drone Indoor SLAM
0 stars 0 forks source link

Docker Compilation #29

Closed tylerferrara closed 2 years ago

tylerferrara commented 2 years ago

@tberg1234 Can you run these commands?

# Leave this command running
docker-compose up --remove-orphans --build >> /path/to/logfile.txt 2>&1
# Once the container is up, run this command in a new terminal
docker exec -it $(docker ps --format "{{.ID}}") /bin/bash >> /path/to/another/logfile.txt 2>&1

Please attach both log files to this issue.

tberg1234 commented 2 years ago

DockerLog.txt DockerLog2.txt

tylerferrara commented 2 years ago

Your container is running perfectly! The docker container isn't suppose to terminate, which is why it appears to "hang". But you can tell the container is ready once you see it available:

docker ps

It stays alive so you can attach a shell to the container. To do this, you wanna take a look at these docs https://docs.docker.com/engine/reference/commandline/exec/

The examples section outlines our use case nicely.

Basically the command looks like:

docker exec -it <name-of-the-container> <program you want to run>

The -i flag keeps the container alive during the execution of the program, and the -t flag allows you to type (TTY support)

tberg1234 commented 2 years ago

taylor@taylor-GS65-Stealth-Thin:~/multidrone_slam/src/2122_MultiDroneIndoorSLAM$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES bcf3df5a0089 2122_multidroneindoorslam_novnc "/root/catkin_ws/src…" 57 minutes ago Exited (137) 24 minutes ago 2122_multidroneindoorslam_novnc_1

tberg1234 commented 2 years ago

taylor@taylor-GS65-Stealth-Thin:~/multidrone_slam/src/2122_MultiDroneIndoorSLAM$ docker exec -it 2122_multidroneindoorslam_novnc_1 /bin/bash Error response from daemon: Container bcf3df5a00891de8c7d701da160fea9063c7c9d0b0b6bb698a2ddc5eb88356bf is not running

taylor@taylor-GS65-Stealth-Thin:~/multidrone_slam/src/2122_MultiDroneIndoorSLAM$ docker run 2122_multidroneindoorslam_novnc docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/root/catkin_ws/src/entrypoint.sh": stat /root/catkin_ws/src/entrypoint.sh: no such file or directory: unknown. ERRO[0000] error waiting for container: context canceled

tberg1234 commented 2 years ago

taylor@taylor-GS65-Stealth-Thin:~/multidrone_slam/src/2122_MultiDroneIndoorSLAM$ docker start 2122_multidroneindoorslam_novnc Error response from daemon: No such container: 2122_multidroneindoorslam_novnc Error: failed to start containers: 2122_multidroneindoorslam_novnc

tylerferrara commented 2 years ago

Resolved offline