Welcome to the world of containers and virtualization!!!
This docker image defines the environment for Computer Science Sky Lab for Systems Computing.
docker build .
For more detailed output, use:
docker build . --progress=plan
- Build a Docker Image
$ docker build -t sky:cs .
- Run Docker Image Call Scala and Name it as Scala
$ docker run --name os -dit sky:cs # or
$ docker run -v ~/:/home --name os -it sky:cs
- Log into the running Docker container
$ docker exec -it os bash
* Stop a container
```bash
$ docker stop os
- Starting a Docker container
$ docker start os
* Start the gcc Docker Image
```bash
$ docker start -ai sky
- Removing Docker container
$ docker rm os
* remove all docker
```bash
* Removing a Docker image
```bash
$ docker rmi sky:cs
$ docker rm -f $(docker ps -a -q)
- remove all docker images
$ docker rmi -f $(docker images -a -q)
- Refer to the link to install for your prefered Operating System https://docs.docker.com/desktop/install/mac-install/
This Apply to Linux base machines but use sudo infront of the command if you love sudo a lot
- Add the docker group if it doesn't already exist
$ sudo groupadd docker
- Add the connected user $USER to the docker group
- Optionally change the username to match your preferred user.
$ sudo gpasswd -a $USER docker
-
IMPORTANT: Log out and log back in so that your group membership is re-evaluated.
-
Restart the docker daemon
$ sudo service docker restart
- If you are on Ubuntu 14.04-15.10, use docker.io instead:
$ sudo service docker.io restart
$ sudo chmod 666 /var/run/docker.sock
- pulling Ubuntu Xenial image
$ docker image pull ubuntu:xenial
- list of current containers using
$ docker ps -a
- only see the running containers
$ docker ps
- last container that was run
$ docker ps -l
- Naming a container
$ docker container run --net host -v /tmp/.X11-unix:/tmp/.X11-unix -dit --name free ubuntu:xenial
*This would create a new container free
- Starting a start or stopped free
$ docker start emulator
$ docker start emulator
- Launch the container
$ docker exec -it free bash
- Refresh your package manager
$ pwd
$ cd
$ pwd
$ apt update
- Installing basic utilities like
make, cmake, git, vim
$ apt install make cmake git vim
- Install Depencies
$ apt install build-essential libsdl2-ttf-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-gfx-dev libsdl2-dev
- Additional Requirement
$ apt install clang-4.0 clang-tidy-4.0
- Generating SSH
ssh-keygen -t ed25519 -C "[email protected]" # use GitHub Email
- Copy the public key into your Github and Test it
- Refer here for more https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh
$ cat .ssh/id_ed25519.pub
$ ssh -T [email protected]
- Run this on your host machine
$ xhost +local:
- Run this on your container
$ export DISPLAY=:0
- clone the Project
$ [email protected]:GODINME/FreeRTOS-Emulator.git
- follow the doc to know to compile and run.