Installed node and shared xoslib folder
diff --git a/.gitignore b/.gitignore
index b03d344..5a3c8df 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
*.swp
profile
*.moved-aside
+xos/configurations/frontend/Dockerfile
diff --git a/xos/configurations/frontend/Dockerfile.frontend b/xos/configurations/frontend/Dockerfile.frontend
index 3c8d283..8ea28cd 100644
--- a/xos/configurations/frontend/Dockerfile.frontend
+++ b/xos/configurations/frontend/Dockerfile.frontend
@@ -2,4 +2,15 @@
RUN echo "autostart=false" >> /etc/supervisor/conf.d/observer.conf
+# Install Node.js
+RUN sudo apt-get install -y \
+ nodejs \
+ npm
+
+# Link nodejs to node
+RUN sudo ln -s "$(which nodejs)" /usr/bin/node
+
+RUN echo "Node Version: "
+RUN node -v
+
CMD /usr/bin/make -C /opt/xos/configurations/frontend -f Makefile.inside
diff --git a/xos/configurations/frontend/Makefile b/xos/configurations/frontend/Makefile
index d03e1bc..a72eb2b 100644
--- a/xos/configurations/frontend/Makefile
+++ b/xos/configurations/frontend/Makefile
@@ -1,6 +1,7 @@
MYIP:=$(shell hostname -i)
RUNNING_CONTAINER=$(shell sudo docker ps|grep "xos"|awk '{print $$NF}')
LAST_CONTAINER=$(shell sudo docker ps -l -q)
+XOS_FOLDER=$(shell pwd)
all: frontend
@@ -8,8 +9,10 @@
sudo apt-get -y install httpie
cat ../common/Dockerfile.common Dockerfile.frontend > Dockerfile
cd ../../..; sudo docker build -t xos -f xos/configurations/frontend/Dockerfile .
- sudo docker run -d --add-host="0.0.0.0:$(MYIP)" -p 9999:8000 xos
- bash ../common/wait_for_xos.sh
+ echo $(XOS_FOLDER)
+ sudo docker run -v $(XOS_FOLDER)/../../core/xoslib:/opt/xos/core/xoslib -p 9000:8000 --add-host="0.0.0.0:127.0.0.1" xos
+ #sudo docker run -d --add-host="0.0.0.0:$(MYIP)" -p 9999:8000 xos
+ #bash ../common/wait_for_xos.sh
stop:
sudo docker stop $(RUNNING_CONTAINER)
diff --git a/xos/configurations/frontend/README.md b/xos/configurations/frontend/README.md
index deae586..a964d91 100644
--- a/xos/configurations/frontend/README.md
+++ b/xos/configurations/frontend/README.md
@@ -1,3 +1,5 @@
+# XOS UI Development
+
This configuration launches an XOS container on Cloudlab that runs the XOS develserver. The container is left running
in the backgorund.
@@ -5,9 +7,9 @@
This configuration is intended for developing the XOS GUI.
-# Getting Started
+## Getting Started
- Navigate to '/xos/configurations/frontend' folder
- Run `make` command
-You'll be able to visit XOS at `0.0.0.0:9999`
+You'll be able to visit XOS at `0.0.0.0:9000` and the `xos/core/xoslib` folder is shared with the container. This means that any update to that folder is automatically reported in the container.