Creating a GIF Gallery with Panamax

And Then There Was the GIF

The Internet would be nowhere without the GIF.

Entire sites, whole server farms, are dedicated to serving you the perfect GIF. They make everyone happy. or sad.

Containerizing the GIF!

To honor the Internet's GIF, it is time to create a useles, albeit awesome(!) Panamax template, so that everybody can bask in the glory of the GIF containerized!


In brainstorming how to come up with a nifty Panamax template, I thought, "Ok, what can I do with a GIF?". Talking about it with my wife, I had an epiphany! How could you boil down getting a whole bunch of related GIFs, and then displaying them in a gallery-like fashion, for your fanciful perusal?

I wanted it simple, so you'd give a keyword and run a command, like this:

gifgallery cats  

And poof! You'd have a animated GIF gallery of cats, or dogs, or epic fails, or whatever keyword you passed in.

Simple right?

Seems simple, but I couldn't get it to work.

I had an elaborate plan of:

  1. Gif Acquirer using 'youtube-dl' container that would get youtube videos
  2. Gif Storage that would be linked and the previous container would store them on this shared volume
  3. GIF Convertor that used 'screengif' utility container that could convert videos to GIFs and then store on that shared volume
  4. GIF Displayer that used 'harpjs' or some framework to display these all in a nice gallery


Sadly I couldn't get my Panamax instance to stay up long enough, to hook everything together and test. See the spinning icons? That's all they'd do.


My next, simpler idea was to use a nodejs implementation of the random name generator for containers, use that as a search term, against Giphy's API, and return a funny animated GIF based on the random names that Docker gives containers if you don't name/tag them yourself.

Here's the source code if you're interested (and yes, it's terrible):

Run it on the commandline like 'node randomgifs.js', and you'll get output like:

admin@kmacpro ~/Desktop $ node randomgifs.js  
{ name: 'stupefied+ritchie',
  image: '' }

Cool, right?

Final Countdown

Going to submit this badboy as is, and see if I can get any credit. Out of time to get it fully working. :(

Oh, and if you're reading this, and wondering how to pronounce "GIF", please listen to Chris Hardwick...I'm with him:


Obligatory Panamax GIF: