Creating Docker image for River4

23 views
Skip to first unread message

Frank McPherson

unread,
Jul 30, 2015, 5:38:57 PM7/30/15
to river4
I am in the process of learning Docker and decided to use River4 as source for creating a Node web app in a Docker image. I've got it running successfully, just working out some last bits that include providing an initial reading list. 

So, I can get River4 running in a container, which I have running on an Ubuntu server hosted as a VMWare guest on my PC. I've confirm that it is running by seeing the output on the terminal screen as Dave shows in his screencast for installing River4 on a Mac, and I can access the River4 web page and dashboard. 

I've also been able to use the River4 console (river4.io) to access the dashboard. My next step was to use the console to add a feed, but it looks like the console expects at least one OPML file in the lists directory as opposed to creating a file if none exist. I just want to confirm this is expected behavior so as to confirm I still have everything running correctly up to this point. 

I believe I will need to create a default/sample subscription list file (OPML) and put it in the lists folder so there is something in place when River4 starts up, then I think from that point forward one could use the console to edit that sample file. Since I will need to create the /river4data/lists folder before the first run of the app, I assume that I will also need to create the /river4data/data and /river4data/rivers folders that would otherwise be created along with lists the first time you run river4.js. Since these folders will exists ahead of time, do I need to put any files in them or can they just be empty? 

Once I get the above working with the intial sample list I think the remaining item for me to figure out is how to persist changes made to reading lists that are made in a running Docker container. What I know right now is that they go away once you shutdown the container. As I said, learning as I am going. :) 

Frank

Dave Winer

unread,
Jul 30, 2015, 6:36:40 PM7/30/15
to riv...@googlegroups.com
Frank, I have to fix that problem with river4.io, but the way you describe it sounds about right. But it will get fixed.

One thing you can do is to use the fact that River4 understands include nodes in the lists, to store the actual lists somewhere else and link them into the (temporary) OPML files in the container. 

Dave



--
GitHub repository: https://github.com/scripting/river4
How to ask for help: http://scripting.com/2014/03/19/howToAskForHelpWithSoftware.html
---
You received this message because you are subscribed to the Google Groups "river4" group.
To unsubscribe from this group and stop receiving emails from it, send an email to river4+un...@googlegroups.com.
To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.
To view this discussion on the web visit https://groups.google.com/d/msgid/river4/a2fff8bc-0acc-48cd-9176-d40aecc93616%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Frank McPherson

unread,
Aug 10, 2015, 5:18:24 PM8/10/15
to riv...@googlegroups.com
I've completed the creation of a Docker image that can be used to run a container that runs River4. The image is on the Docker hub and you can pull a copy with docker pull fmcpherson/river4. See https://hub.docker.com/r/fmcpherson/river4/ 

I've also written some notes for how to use the container, and you can read them here: http://notes.frankmcpherson.net/2015/08/10/river4DockerContainer.html  

The container includes a sample reading list, which turns out to be my own list. I have not yet figured out a way to make the list configurable, that will be the next iteration of the learning process. The only way I know right now for someone else to use their own reading list is to build their own image. I have a Github repo at https://github.com/fmcpherson/DockerizedRiver4 set up for the source files, and I will push my Dockerfile to it shortly, but building a Docker image might be more work than an average person wants to endeavor. 

One approach is to provide an OPML file in the image that uses an include to an external OPML file stored somewhere like Dropbox, however, that works for me but how do I provide that same method for others without getting in the business of managing reading lists. 

At any rate, more to think through, but I thought that what I now have is complete enough to share if anyone else is interested in Docker. 

As an aside.... after playing with this, I am not convinced that Docker provides a better solution for users. If you compare this to the instructions Dave provides for installing River4 on your own computer to what I have done with Docker, you are basically trading installing Nodejs for installing Docker and I am not sure there are big benefits in doing so. The main benefit to using Docker is on the development side because there are tools that can automate the whole Docker build process from the point where you commit to Github. I may piss of the Docker fans, but it seems to me Docker is basically just another run time or virtual environment. 

Dave Winer

unread,
Aug 10, 2015, 5:45:14 PM8/10/15
to riv...@googlegroups.com
Thanks for doing this Frank. I look forward to hearing what other people think. 

Dave



Frank McPherson

unread,
Aug 19, 2015, 3:57:15 PM8/19/15
to riv...@googlegroups.com
I've written step-by-step instructions for setting up your own instance of River4 using the Docker4 image that I created. You will find the instructions at:

If you already have a computer running Docker, you can start running River4 with the one command provided in step 3. 

Please post any feedback on the instructions in the comments section of the blog post. 


For more options, visit https://groups.google.com/d/optout.
--

From the tablet of Frank McPherson
frank.m...@gmail.com

Frank McPherson

unread,
Aug 28, 2015, 12:07:49 PM8/28/15
to riv...@googlegroups.com
For testing purposes, I have set up an instance of River4 on Microsoft Azure. I am not sure how long I will keep it up, but for the moment it is available at http://pebblecreek.cloudapp.net/ 

Blog post with a bit more information is available here: http://notes.frankmcpherson.net/2015/08/28/river4OnAzure.html 
Reply all
Reply to author
Forward
0 new messages