Friday, May 6, 2016

Notes on Docker

In a Docker installation on Linux, your machine is both the localhost and the Docker host. In networking, localhost means your computer. The Docker host is the machine on which the containers run.

Container runs the selected OS image.


Quick Start:


  1. Download and Install Docker toolbox
  2. Make sure Virtual box is installed, it is included in Docker Toolbox
  3. For troubleshooting: http://stackoverflow.com/questions/33725779/failed-to-open-create-the-internal-network-vagrant-on-windows10
  4. Follow below steps to Create a new Docker VM


set PATH=%PATH%;"C:\Program Files\Git\bin"


docker-machine create --driver virtualbox my-default


Setting Proxy on Windows

Method-1

In Docker Toolbox install folder identify start.sh file and include following lines

#export HTTP_PROXY=http://example.com:80

#export HTTPS_PROXY=https://example.com:80
Close and open Docker Quickstart Terminal.

Method-2

  1. Connect to Docker machine
  2. Connect 
    • docker-machine ssh default
  3. sudo vi /var/lib/boot2docker/profile
    • HTTP_PROXY=http://example.com:80
    • HTTPS_PROXY=https://example.com:80
  4. Restart the docker-machine

Starting Kitematic using proxy


for /f %%i in ('docker-machine.exe ip default') do set DOCKER_HOST=%%i

SET NO_PROXY=%DOCKER_HOST%

set DOCKER_HOST=tcp://%DOCKER_HOST%:2376
cd Kitematic
Kitematic.exe

Saving and Loading images to and from file system

Saving sample:
docker export - saves a container's running or paused instance to a file

docker save - saves a non-running container image to a file
docker save -o <save image tar file> <image name>

Loading sample:
docker load -i <path to image tar file>

Docker Commit (Save Changes Locally):
sudo docker commit container_id image_name : commit changes made to a local docker container to save any changes made locally.

Thursday, May 5, 2016

Smart Accelerator

This idea is about automobiles with wrong accelerator press detection and collision prevention technology.

This leverages radar sensor's on the vehicle which provides the distance between your vehicle and vehicle's in front of you. Based on your current speed if you mistakenly pressed accelerator instead of break then based on above described acquired details it is trivial for the system to identify whether it is a wrong accelerator press. If it is a wrong press then it will be curtailed from being applied really on the vehicle and prevents a dangerous accident. 

Sky Eye - Eye in the Sky

Source: www.freedesignfile.com
Here I am talking about new technology idea which helps police and other security personal in chasing and pursuing the suspects who are trying to escape in fast moving vehicles.

Let us take a scenario where in a police officer is trying to chase and catch fast moving car which jumped the traffic checkpoint without going through the check. Let us assume there is lot of traffic on the road and police car is unable to overtake the offender car and is gradually losing it.

Now this police officer can switch on the sky eye and mark the fast moving car, from here on the sky eye also starts tracking the offender with much more speed than the offenders speed and relay the movements, coordinates and video to the pursuing police officer. 

Sky eye is an expert system running on police force's servers, it heavily leverages advanced GPS capabilities to track the vehicle direction, speed and vehicle identification marks such as color, make, model, registration number etc. It uses machine learning techniques to remember the pursuing vehicle and differentiate it from other surrounding vehicles and identify it. GPS would be feeding the video of the circular area for the given coordinates & radius provided by and to the Sky Eye. Sky Eye would estimate the next possible circular area where the vehicle would be present in the next time period based on the last scanned speed of vehicle, this coordinates are given to GPS to get the video and vehicle is identified from the video and this process continues until vehicle stops. All these identified vehicle trace coordinates and video's are relayed to ground force in real time for pursue.

This automated system could be used in unmanned check posts to track the offending vehicle and report to the nearest police station with all the trace details.