Docker
Hello World (Ubuntu 14.04)
reference: blog.hellosanta.com.tw
$ uanme -r # check to see if kernel version is > 3.10
$ sudo apt-get install curl # install curl
$ curl -fsSL https://get.docker.com/ | sh # install docker
$ docker -v # verify docker installed
$ docker run hello-world # should display "Hello from Docker"
$ docker run ubuntu:14.04 /bin/echo 'Hello world' # disable interactive mode
$ sudo docker run -d ubuntu:14.04 /bin/sh -c "while true; do echo hello world; sleep 1; done" # daemonized execution
Image Source: https://denibertovic.com/talks/supercharge-development-env-using-docker
Docker CLI Example
(ref: https://denibertovic.com/talks/supercharge-development-env-using-docker)
$ docker login
$ docker pull denibertovic/postgres
$ docker run -d -t denibertovic/postgres
$ docker run -i -t debian /bin/bash
$ docker run -d -t postgres
$ docker run -d -t postgres:9.3
$ docker ps
$ docker logs 2344d8a4e916
$ docker stop 2344d8a4e916
$ docker kill 2344d8a4e916
$ docker start 2344d8a4e916
Docker Build Image
Dockerfile:
FROM debian:wheezy ENV DEBIAN_FRONTEND noninteractive
...
RUN apt-get -qq update RUN apt-get -qq -y install postgresql-9.3 \ postgresql-client-9.3 postgresql-contrib-9.3 ADD postgresql.conf /etc/postgresql/9.3/main/postgresql.conf ...
CMD /usr/local/bin/start_postgres.sh
$ docker build -t postgres .
$ docker commit
$ docker push username/postgresql
Docker VS. Virtual Machines
Image Source: https://philipzheng.gitbooks.io/docker_practice
Run OPENSUSE container
No Hackers yet
Looking for hackers with the skills:
Nothing? Add some keywords!
This project is part of:
Hack Week 15
Comments
Be the first to comment!
Similar Projects
This project is one of its kind!