picatz / goldengirl

✨ All that shimmers is gold!
MIT License
3 stars 0 forks source link

document docker process #13

Open picatz opened 6 years ago

picatz commented 6 years ago

For those who don't know how to docker: it would be nice to have a small guide for how to get started working with it, at least in the context of this project.

picatz commented 6 years ago

There's some good work/examples outlined in https://github.com/picatz/goldengirl/issues/20

malwaremily commented 6 years ago

Hey guys i whipped up a getting started video if anybodys interested, i also have links in the description to various parts of the video so you don't have to watch the whole thing if you don't need to/want to

https://www.youtube.com/watch?v=89AyJNbV0CY&feature=youtu.be

To watch this video, you must logged into youtube with your emich.edu

Youtube is fighting me on adding comments to a private video so all corrections will be listed here (or below if you find any):

  1. You don't need to download docker on your physical machine, you want it on the virtualmachine, goldengirl. So don't bother installing it.

~2. The mysql and psql commands need to be downloaded to test those containers. Whoops.~ ~yum install mysql -y~ ~yum install postgresql -y~

Note: This video is outdated and uses an older version of goldengirl so experience may vary.

malwaremily commented 6 years ago

If you would like to know more about using git.

git ELI5: http://rogerdudler.github.io/git-guide/

malwaremily commented 6 years ago

How to test and run services using docker containers.

  1. dns see: https://github.com/picatz/goldengirl/issues/37 cd ~/dockerfiles/dns go get github.com/miekg/dns go build dns.go sudo docker build -t dns . sudo docker run -itd -p 53:5353/udp dns dig @localhost test.service sudo docker ps -a sudo docker logs$CONTAINERID
  2. elasticsearch see: https://github.com/picatz/goldengirl/issues/38 cd ~/dockerfiles/elasticsearch sudo docker build -t elasticsearch . sudo docker run -itd -p 9200:9200 elasticsearch curl http://localhost:9200 sudo docker ps -a sudo docker logs $CONTAINERID
  3. ftp see: https://github.com/picatz/goldengirl/issues/36 cd ~/dockerfiles/ftp sudo docker build -t ftp . sudo docker run -itd -p 21:21 ftp sudo python test.py 0.0.0.0 21 root picat /example wiggle sudo docker ps -a sudo docker logs$CONTAINERID
  4. http
  5. https
  6. imap
  7. imaps
  8. mysql see: https://github.com/picatz/goldengirl/issues/30 cd ~/dockerfiles/mysql sudo docker build -t mysql . sudo docker run -itd -p 3306:3306 mysql mysql -h 127.0.0.1 -u root -p password: picat CTRL+Z to escape sudo docker ps -a sudo docker logs$CONTAINERID
  9. postgresql see: https://github.com/picatz/goldengirl/issues/29 cd ~/dockerfiles/postgresql sudo docker build -t postgresql . sudo docker run -itd -p 5432:5432 postgresql mysql -h 127.0.0.1 -U picat picat CTRL+Z to escape sudo docker ps -a sudo docker logs$CONTAINERID
  10. smtp
  11. smtps
  12. ssh see: https://github.com/picatz/goldengirl/issues/35 cd ~/dockerfiles/ssh sudo docker build -t ssh . sudo docker run -itd -p 2222:22 ssh sudo docker ps -a sudo docker logs$CONTAINERID
  13. vnc

How to add needed services to goldengirl host

  1. Install services manually.
  2. Test dockercontainer.
  3. remove services.
  4. logout of host goldengirl.
  5. edit vagrantfile: add services where appropriate
  6. vagrant reload
  7. vagrant ssh
  8. build. run. test. dockercontainer.
  9. PASS: push changes to a branch for review DOCUMENTATION IN PROGRESS Last Edited: 1/28/18 21:41