abarbarian Posted August 23, 2015 Share Posted August 23, 2015 (edited) I have been keeping an eye on the Docker program for some while and whilst I have yet to give it a run I think it is one of the most exiting developments in the IT world. It seems to have some advantages over programs like VM or Virtual Box. Not familiar with docker ! Well if you do not get up to speed then like the dinosaur you will become extinct.Here is a some information to stop that happening. Solomon Hykes Explains Docker (2013) What is Docker? Docker brings the power of Linux containers (LXC) and aufs (Another Union File System) to create a new level of packaging and process isolation that really is something you should sit up and take note of. The first thing to mention about Docker is that it is a single executable daemon. That means it is easy to download and start running docker images on your Linux-based operating system. This docker daemon manages the docker processes, which run inside of LXC containers. A docker process is an instance of a docker image, and a docker image has one primary process that will run when you instantiate it. Have a spare 100 milliseconds and you want to run CouchDB? "docker run couchdb". A second later CouchDB will be running in an isolated container. It will be unaware that it is running inside of Docker. Want to run a headless Firefox with a VNC interface under Suse Linux? Just run the docker image for that. Want to run 20 instances of that docker image on the same machine? Just run "docker run" 20 times. Each process thinks it is binding to the same port. Suddenly you are testing a Cassandra or Hadoop cluster on one machine. I know I am a couple of years late in posting this but as they say better late than never. So this thread is dedicated to Docker images that are becoming available. Docker images of Kali Linux 2.0 (2015) About a week ago the Kali Linux (live) distribution version 2.0 was released, now Offensive Security – the company behind Kali Linux – has published so-called Docker images of Kali Linux 2.0, which lets you run it on any platform. Has anyone used Docker ? If so please do post your experiences. Edited August 23, 2015 by abarbarian Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Very cool. I have yet to use Docker but I do not know some about it. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Wow that was simple.. I just followed the installation, setup user from here: https://wiki.archlin...ndex.php/Docker Then as root, I ran this to fetch the kali docker: root@Cerberus Dockers #docker pull kalilinux/kali-linux-docker Using default tag: latest latest: Pulling from kalilinux/kali-linux-docker e1bfb89993bf: Pull complete b4be4f2256bf: Pull complete 93d580d5b6d4: Pull complete 7267bc58e014: Pull complete 2c00b1e4f611: Pull complete a5acfcddcae4: Pull complete e3177c843499: Pull complete 198c6df71ab3: Already exists Digest: sha256:fcc3e894b9d03b20e37f3e4748dbca798a8e1a50ec7b9ddfa1e9dbd1b208efa1 Status: Downloaded newer image for kalilinux/kali-linux-docker:latest Then I started it with this: root@Cerberus Dockers # docker run -t -i kalilinux/kali-linux-docker /bin/bash root@697ac8535c64:/# cat /etc/issue Kali GNU/Linux 2.0 \n \l root@697ac8535c64:/# If you notice above when I run the command, it puts me in kali (notice the output of cat /etc/issue) Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 23, 2015 Author Share Posted August 23, 2015 Super neat job. Does Kali tun as smooth as it would on a full install ? I just knew you would have a go if I dangled some bait Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Now I just need to find out where it holds the actual containers. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Super neat job. Does Kali tun as smooth as it would on a full install ? I just knew you would have a go if I dangled some bait I never went through and installed X, etc. It just gives you terminal access. Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 23, 2015 Author Share Posted August 23, 2015 Now I just need to find out where it holds the actual containers. <path> is your docker home. The path defaults to /var/lib/docker. Could this be where. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Now I just need to find out where it holds the actual containers. is your docker home. The path defaults to /var/lib/docker. Could this be where. Yeah but I need to move that to another harddrive. Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 23, 2015 Author Share Posted August 23, 2015 So the images are held in /var/lib/docker and you are locating /var on another drive so you have more space. Did I get that right ? Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Oh I know how to fix it. cp -rvf /var/lib/docker /home/comhack/Miscellaneous/ Then edit /etc/docker and add: DOCKER_OPTS="-g /home/comhack/Miscellaneous/docker/" Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Wait, you need to stop docker.service first systemctl stop docker.service Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 23, 2015 Author Share Posted August 23, 2015 So you have /home on one drive and , / , on another ? I get the code for cp, but what is the " -g " for in "-g /home/comhack/Miscellaneous/docker/" ? :'( Wait, you need to stop docker.service first systemctl stop docker.service Makes sense. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Was following this: https://groups.google.com/forum/#!topic/docker-user/AKqf_qIhFL4 Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Ok, none of that worked. Gonna have to research more.. Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 23, 2015 Author Share Posted August 23, 2015 Does this help ? To save image to any file path or shared nfs see following example. Get image id by doing: sudo docker image Say you have image with id "matrix-data" Save image with id: sudo docker save -o /home/matrix/matrix-data.tar matrix-data Copy image from path to any host Now import to your local docker using : sudo docker load -i <path to copied image file> Hope this make make more clear. Thanks http://stackoverflow.com/questions/23935141/how-to-copy-docker-images-from-one-host-to-another-without-via-repository Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 They may just work, thanks. I will try in a bit Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Well that didn't work: Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 I'm still working on it but I wish I could simply have everything point to a different directory, not just the containers and volumes. I figured out a couple of things though: For instance, to get the list of containers, run this: docker ps -a And the output looks like this: I figured out you can save the Container by using: docker save fd72eaa75035 > ~/Miscellaneous/docker/fd72eaa75035.tar But I am having issues loading the container afterwards: root@Cerberus docker #docker load -i -t fd72eaa75035.tar /bin/bash docker: "load" requires 0 arguments See 'docker load --help'. Usage: docker load [OPTIONS] Load an image from a tar archive or STDIN root@Cerberus docker # Most of this I figured out from the zsh switch tab completion and these links: https://docs.docker.com/userguide/usingdocker/ https://groups.google.com/forum/#!topic/docker-user/AKqf_qIhFL4 Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 23, 2015 Author Share Posted August 23, 2015 (edited) Well in my example they do things from the os terminal as in " sudo docker save -o" which is " root@homepc# docker save -o" wheras you are doing " root@Cerberus docker #docker -o " so you are trying to do things from within docker. I think that may be the problem. Also in my example there is only an " -i " option wheras you gave a " -i -t " which may make a difference. Also you are trying to load an image by id wheras you may need to do " <path to copied image file> " instead. I could be wrong. It will have to happen someday Edited August 23, 2015 by abarbarian Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Well in my example they do things from the os terminal as in " sudo docker save -o" which is " root@homepc# docker save -o" wheras you are doing " root@Cerberus docker #docker -o " so you are trying to do things from within docker. I think that may be the problem. Yeah, I realized that by this command on the last comment: docker save fd72eaa75035 > ~/Miscellaneous/docker/ fd72eaa75035.tar Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 23, 2015 Author Share Posted August 23, 2015 Darn I missed that post as I was too busy re-posting amendments. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Hehe, it's ok as I was a big unorganized on the posts lol Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 23, 2015 Author Share Posted August 23, 2015 Good luck I'm of to bed . Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 23, 2015 Share Posted August 23, 2015 Good luck I'm of to bed . Rest well bro Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 24, 2015 Author Share Posted August 24, 2015 New day new cock ups at least we are learning how to bug chase I found this https://docs.docker.com/installation/archlinux/ Custom daemon options If you need to add an HTTP Proxy, set a different directory or partition for the Docker runtime files, or make other customizations, read our systemd article to learn how to customize your systemd Docker daemon options. Which takes us here https://docs.docker.com/articles/systemd/ Runtime directory and storage driver You may want to control the disk space used for Docker images, containers and volumes by moving it to a separate partition. In this example, we’ll assume that your docker.service file looks something like: [unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network.target docker.socket Requires=docker.socket [service] Type=notify ExecStart=/usr/bin/docker daemon -H fd:// LimitNOFILE=1048576 LimitNPROC=1048576 [install] Also=docker.socket This will allow us to add extra flags via a drop-in file (mentioned above) by placing a file containing the following in the /etc/systemd/system/docker.service.d directory: [service] ExecStart= ExecStart=/usr/bin/docker daemon -H fd:// --graph /mnt/docker-data --storage-driver btrfs You can also set other environment variables in this file, for example, the HTTP_PROXY environment variables described below. What stumps me is what to call the file Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 24, 2015 Share Posted August 24, 2015 Thanks, I will check that out later this evening. Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 25, 2015 Author Share Posted August 25, 2015 So how are things down on the waterfront. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 25, 2015 Share Posted August 25, 2015 So how are things down on the waterfront. Haven't played as I have been too busy trying to get a freaking job Quote Link to comment Share on other sites More sharing options...
abarbarian Posted August 26, 2015 Author Share Posted August 26, 2015 So how are things down on the waterfront. Haven't played as I have been too busy trying to get a freaking job Best of luck with the hunt. 1 Quote Link to comment Share on other sites More sharing options...
securitybreach Posted August 26, 2015 Share Posted August 26, 2015 Best of luck with the hunt. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.