diff --git a/Dockerfile b/Dockerfile index c7b58000..3542b92e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,6 @@ WORKDIR /usr/local/src/xblock-sdk ADD . . RUN easy_install pip RUN make install +EXPOSE 8000 ENTRYPOINT ["python", "manage.py"] +CMD ["runserver", "0.0.0.0:8000"] diff --git a/README.rst b/README.rst index 6350daef..61228ea6 100644 --- a/README.rst +++ b/README.rst @@ -34,6 +34,20 @@ This code runs on Python 2.7. #. Open a web browser to: http://127.0.0.1:8000 +Docker +------ + +Alternatively, you can build and run the xblock-sdk in Docker. + +After cloning this repository locally, go into the repository directory and build the Docker image:: + + $ docker build -t xblock-sdk . + +You can then run the locally-built version using the following command:: + + $ docker run -d -p 8000:8000 --name xblock-sdk xblock-sdk + +You should now be able to access the XBlock SDK environment in your browser at http://localhost:8000 Testing --------