Monday, April 10, 2017

GitLab - Omnibus Edition

In an attempt to look for a build/deployment pipeline at home, I came upon GitLab, a source control and continuous integration/deployment system. This really appealed to me because my entire home setup was meant to be controlled by automation. GitLab definitely fills a gap, but I ran into a lot of issues, and still have some that are plaguing me.

Monday, April 3, 2017

Docker Purge

There comes a time, when you just want to purge all the docker things from a machine. Over time, you can accumulate a bunch of garbage, and not even really realize it. While playing around at work and at home, I came up with this little script I use pretty often to clear out my working Docker environment on a system.

containers=$(docker ps -a -q)
if [ ! -z "$containers" -a "$containers" != " " ]; then
  echo Stopping $containers
  docker stop $containers
  docker rm $containers
  echo No containers running

images=$(docker images -a -q)
if [ ! -z "$images" -a "$images" != " " ]; then
  echo Removing Images $images
  docker rmi $images
  echo No images installed

docker volume prune -f
docker network prune -f

This can be used on Linux, Bash for Windows, and even CGWyn. Basically, stop all containers, remove them, remove all images, prune all volumes, and prune all networks.

If you have any improvements to this, let me know down below in the comments!

Sunday, April 2, 2017

Project Alphaberry - Part 4

It’s been a few weeks since my last update, and for anyone who follows me on Twitter you would have discovered that my progress is going, albeit slow. Life tends to get in the way of things, and getting through the learning curve of this project, without getting horribly sidetracked, has been a huge challenge, but, I knew this when I started, and I actually love every second of it! I know so much more about linux, networking, ansible, and docker at this point, then I though I could cram into just a few months at this.