Docker hostname option
You can control the hostname when you start a container by using the –name option docker run –rm -ti –hostname =”mycontainer.linuxconsultant.org” ubuntu:latest
Read MoreYou can control the hostname when you start a container by using the –name option docker run –rm -ti –hostname =”mycontainer.linuxconsultant.org” ubuntu:latest
Read MoreTag your image with: docker tag username_on_registry/image_name:latest Then docker push username_on_registry/image_name:latest
Read Moreusing docker exec docker exec -t -i CONTAINERID /bin/bash for example docker exec -t -i 589f2ad30138 /bin/bash using docker-machine docker-machine ssh MACHINENAME
Read Moredocker logs CONTAINERID for example docker logs c5a6254f7da2 to see logs update in realtime (similar to tail -f) add -f for example docker logs c5a6254f7da2 -f for no logs add the option –log-driver = none
Read MoreYou can save changes you make to your docker container by getting the container id and running the following command docker commit CONTAINERID IMAGENAME for example after installing apache I ran docker commit 89c48ac17dd7 apache-simple
Read MoreWhen you run “docker images” you’ll get results that look something like this REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE ubuntu latest 1d073211c498 2 weeks ago 187.9 MB To remove a image type “docker rmi -f IMAGE_ID (the 3rd column above). Warning this is permanent.
Read Morecd to the directory containing your exported docker files, then run zip ../FILENAME.zip -r * .[^.]* This way kind of sucks, looking for a better way to do it.
Read MoreTo list your installed docker images run docker images To list your running docker containers run docker ps
Read MoreDocker installation information can be found at http://docs.docker.com/engine/installation/
Read MoreUnbuntu docker run –rm -ti ubuntu:latest /bin/bash Fedora docker run –rm -ti fedora:latest /bin/bash CentOS docker run –rm -ti centos:latest /bin/bash
Read MoreExport a container (for use with amazon web services for example) by running the following command: docker export CONTAINERNAME > NAME.tar for example docker export fsk-apache > fsk-apache.tar
Read MoreSee docker documentation http://docs.docker.com/engine/articles/baseimages/
Read Moredocker build -t GROUPNAME/DOCKERPAGENAME:VERSION DIRECTORY so for example docker build -t example/ docker-node-hello:latest .
Read MoreIf you’re using linux you can install docker by doing the following: ubuntu apt-get install docker.io sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker Fedora yum -y install docker-io Mac OSX Install the docker toolbox Windows Also has a tool box but I’ve never used it. Docker Cheatsheet https://github.com/wsargent/docker-cheat-sheet
Read MoreThe default repos for Amazon’s Centos are lacking a lot. Add this repo to the default Amazon Centos setup. in /etc/yum.repos.d/ius.repo comment out: mirrorlist=http://dmirr.iuscommunity.org/mirrorlist?repo=ius-el5&arch=$basearch add: baseurl=http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/$basearch
Read MoreThe best way to handle minor updates is to first back everything up (your web directory and your database) then download the new version of drupal to a directory (lets use ~/drupalupdate as the download directory and /var/www/html as the webdirectory) cd into the download directory and run the following command find * -type f -exec echo cp {} /var/www/html/{} \; This one just test everything and echos what it would really do. If everything looks good run find * […]
Read More