With no arguments, this will start the container named "fuego-container". However, if you have a multiple fuego containers, or have a container with a different name, you can specify the container name on the start.sh command line.
This will call ./fuego-host-scripts/docker-create-usb-privileged-container.sh to create a container with extra privileges to certain host devices.
This script includes a set of devices that the container is granted access to. However, you may need to add a new device to the list. To add a new device to be accessible inside the docker container, please edit the following line in docker-create-usb-privileged-container.sh:
CONTAINER_ID=`sudo docker create -it --privileged -v /dev/bus/usb:/dev/bus/usb -v /dev/ttyACM0:/dev/ttyACM0 ... --net="host" fuego`
With above, only "ttyUSBx" and "ttyACM0" will be detected and accessible inside the docker container.
NOTE: as of February, 2017, this script was in the next branch of the fuego repository.
- show the running docker ID
- sudo docker ps
- execute a command in the container
- docker exec <id> <some_command>
- attach another shell inside the container
- sudo docker exec -i -t <id> bash
- access docker container using ssh
- ssh user@<ip_addr> -p 2222
- sshd is running on 2222 in the container, if the default sshd_config is used
- copy files to the container
- docker cp foo <id>:/path/to/dest
- copy files from the container
- docker cp <id>:/path/to/src/foo bar
In the host system, these are under fuego-ro and fuego-rw in the directory where the container was created. (This is usually in the top level of the fuego repository.)
Here are some files that persist:
- fuego-ro/boards* - for board definition files
- fuego-ro/conf/ttc.conf - for use with ttc targets
- fuego-ro/toolchains - this is where toolchains and SDKs can be installed
- fuego-ro/toolchains/tools.sh - this file has the multiplexor for the different toolchains (on the PLATFORM variable)
- fuego-rw/logs - this has logs from executed test runs
- fuego-rw/buildzone - this is where test programs are built
- fuego-rw/test - place where the board 'docker' places test materials
- grep -q docker /proc/1/cgroup ; echo $?
- will be 0 if inside the container, 1 if on host
- docker ps -a - show docker containers on your system, and their images
- docker images - show images on your system, and their age and size
- docker rmi <id> - remove an image (you must remove any containers using this image first)
- docker rm <id> - remove a container
Solution: Get the container id (of the non-running container) via
$ 'docker ps -a' command
Replace the faulty file with original/corrected one via 'docker cp' command as shown in the example below.
$ sudo docker cp jenkins 6b4e6e63rfg7:/etc/default/where '6b4e6e63rfg7' is the container id of the non-running container
Now you will able to start the docker container successfully.