Lab hack: docker notes

Allowing Rights to Host Mounted Volumes

#docker ps -a
#docker run -v 

-v option creates the volume

#docker -v <container name>

Sharing namespaces between the container & host

#docker run -itd —-volume-from <container> —-name=<container with storage>
#docker run -itd —-volume-from Labdata1 —-name=Labdata2 busybox
#docker ps
#docker network inspect

Riak Service as container

#docker build -t fredriark/riak
#docker images

Dockerizing ssh service

#docker images
#docker ps
#docker network ls
#docker build -t eg_ssh .
#docker run -d -P —-name labtest_sshd eg_sshd
#docker ps
#docker network inspect bridge
#docker port labtest_ssh 22

Running NginX in container

#docker run —-rm -i -t -p 80:80 nginx 

Leave a Reply

RELATED POST

Reverse Proxy Apache

Neat trick after subdomain is created, want to preserve the url for example lets look at this lab hack (its…

scp to a port

Quick reminder on how to transfer a file to a specific port, the option is upper -P $ scp -P…

Install Apache using Puppet Master

In this vast world of orchestration & automation tools and techniques, here is a quick one on how to get…

Docker: Ubuntu dockerfile example

My dockerfile example to run Ubuntu 14.04 From Ubuntu:14.04 Maintainer kewrunner@gmail.com Run apt-get update && apt-get install -y openssh-server Run…