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

Virtual Machine Manager: Error starting domain

Starting up the KVM error occurred Error starting domain: Requested operation is not valid: network 'default' is not active Locate…

Git Commands

How to initialize a Git repo: Everything starts from here. The first step is to initialize a new Git repo…

Lab Hack: Raspberry Pi running VMWare ESXi

As strange as the title sounds, yes I am running VMWare ESXi on a Raspberry Pi 4 Model B (4GB)…

Lab Hack: Ubuntu openssh-server and passwordless authentication

While setting up the lab for a docker swarm training module I decided to spin up a few vms in…