#!/bin/bash
# Build a Docker image to build mLinux 6
docker container stop mlinux-build || true
docker container rm mlinux-build || true
docker build --network=host -t yocto-bionic .
docker run -P -itd --name mlinux-build yocto-bionic:latest bash
echo 'You should be able to ssh to the following address at port 22 (the ssh port):'
docker inspect -f "{{ .NetworkSettings.IPAddress }}" mlinux-build
echo 'Printing out the userid:password for ssh access'
docker exec mlinux-build /bin/cat /home/mlbuilder/password.txt
docker exec -it mlinux-build /bin/bash