Merge pull request #37 from caglar10ur/readme

depends on https://github.com/open-cloud/xos/pull/34, but this is now working
diff --git a/Dockerfile b/Dockerfile
index 6da1e5a..08f4f8d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -77,6 +77,13 @@
 RUN git clone git://git.planet-lab.org/fofum.git /tmp/fofum
 RUN cd /tmp/fofum; python setup.py install
 
+RUN mkdir -p /usr/local/share /bin
+ADD http://phantomjs.googlecode.com/files/phantomjs-1.7.0-linux-x86_64.tar.bz2 /usr/local/share/
+RUN tar jxvf /usr/local/share/phantomjs-1.7.0-linux-x86_64.tar.bz2 -C /usr/local/share/
+RUN rm -f /usr/local/share/phantomjs-1.7.0-linux-x86_64.tar.bz2
+RUN ln -s /usr/local/share/phantomjs-1.7.0-linux-x86_64 /usr/local/share/phantomjs
+RUN ln -s /usr/local/share/phantomjs/bin/phantomjs /bin/phantomjs
+
 # Get XOS 
 ADD planetstack /opt/xos
 
@@ -89,7 +96,7 @@
 RUN service postgresql start; sudo -u postgres psql -c "alter user postgres with password 'password';"
 
 # Turn DEBUG on so that devel server will serve static files
-RUN sed -i 's/DEBUG = False/DEBUG = True/' /opt/xos/planetstack/settings.py
+RUN sed -i 's/DEBUG = False/DEBUG = True/' /opt/xos/xos/settings.py
 
 # Cruft to workaround problems with migrations, should go away...
 RUN /opt/xos/scripts/opencloud dropdb
diff --git a/planetstack/openstack_observer/steps/sync_images.py b/planetstack/openstack_observer/steps/sync_images.py
index f5764a1..94cfd99 100644
--- a/planetstack/openstack_observer/steps/sync_images.py
+++ b/planetstack/openstack_observer/steps/sync_images.py
@@ -17,11 +17,14 @@
             return []
 
         # get list of images on disk
-        images_path = Config().observer_images_directory 
+        images_path = Config().observer_images_directory
+
         available_images = {}
-        for f in os.listdir(images_path):
-            if os.path.isfile(os.path.join(images_path ,f)):
-                available_images[f] = os.path.join(images_path ,f)
+        if os.path.exists(images_path):
+            for f in os.listdir(images_path):
+                filename = os.path.join(images_path, f)
+                if os.path.isfile(filename):
+                    available_images[f] = filename
 
         images = Image.objects.all()
         image_names = [image.name for image in images]
@@ -35,8 +38,7 @@
                               container_format='bare', 
                               path = available_images[image_name])
                 image.save()
-       
-        
+
         return Image.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None)) 
 
     def sync_record(self, image):