Skip to content

Commit

Permalink
Merge pull request #108 from jbarciauskas/jbarciauskas/add-docker-sup…
Browse files Browse the repository at this point in the history
…port

Add Dockerfile to support building and running the XBlock workbench via a Docker container
  • Loading branch information
jbarciauskas authored Oct 12, 2016
2 parents 65cb77f + ae88852 commit 6a695d9
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dockerfile
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM phusion/baseimage:latest
RUN apt-get update && apt-get install -y \
build-essential \
git \
lib32z1-dev \
libjpeg62-dev \
libxml2-dev \
libxslt-dev \
python-dev \
python-setuptools \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/local/src/xblock-sdk
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"]
14 changes: 14 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------
Expand Down

0 comments on commit 6a695d9

Please sign in to comment.