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

grep -v or egrep

Filter using -v option and -e options grep "Client ip" /var/log/messages | awk '{print $10}' | grep -v -e "Protocol"…

SQL Dumps & Restore

Take a dump or leave a dump? First backup all the databases mysqldump -u root -p --all-databases > all_db_dump_04APRIL2020.sql You…

Linux Malware Detection

Im running CentOS in the lab environment, running into some issues with NOC saying botnet hijacked one or some of…

Lab Hack: Apache URI purgatory

To HTTP or to HTTPS, that is the question. This lab hack takes me deep into the domain.conf which controls…