tutorials vrx_docker_manual_run - osrf/vrx GitHub Wiki

Manually Run Your Container

The tutorial explains how to run a competitor image manually (i.e. without using the run_trial.bash script). This may help troubleshoot in cases where:

  • the container is exiting too quickly to log into it;
  • you want to avoid exiting when the trial times out;
  • you want to test a change without running a whole trial.

Reminder: Images vs Containers

  • These instructions refer separately to both the competitor image and the container generated from the image.
  • As a reminder, the image is an inert package containing executables, their dependencies, and anything needed to set up their environment.
  • A container is a runtime instance of an image.

Run the Competitor Image

  • List your images to find the ID of the image you want to run:
    docker image ls
    
    Copy the value in the IMAGE ID column
  • Use the run command to launch a container from your image:
    docker run -it <IMAGE_ID>
    
    • The -it options create an interactive terminal. This makes it easier to see output from your container or close it using CTRL+C.
    • Alternatively, you can use <REPOSITORY_NAME>:TAG instead of <IMAGE_ID>.

Open a bash terminal

If the run command above causes your container to launch and remain running, you can open an interactive bash terminal into it as we did in the previous tutorial.

  • First, get the container ID:
    docker container ls
    
    Copy the value in the CONTAINER ID column.
  • From a new terminal, run:
    docker exec -it bash <CONTAINER_ID>
    

Override the Entrypoint

If your container is exiting too quickly to examine, you may want to override the startup command so it launches an interactive bash session instead.

  • We can do this with the --entrypoint option:
    docker run -it --entrypoint="/bin/bash" <CONTAINER_ID>
    
  • Once you are logged in, you can call your startup script manually to debug.
Back: Examine a Running Container Up: VRX Docker Image Overview Next: Run a Trial Manually
⚠️ **GitHub.com Fallback** ⚠️