Skip to content

Commit

Permalink
docker updates for authors
Browse files Browse the repository at this point in the history
  • Loading branch information
vrthra committed Nov 8, 2018
1 parent 1e73171 commit ba713ce
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 1 deletion.
2 changes: 2 additions & 0 deletions deploy/bin/connect
@@ -0,0 +1,2 @@
docker exec -it fuzzing-book-instance /bin/bash
# docker exec -u 0 -it fuzzing-book-instance /bin/bash
1 change: 1 addition & 0 deletions deploy/bin/create-publish-build
@@ -0,0 +1 @@
docker build --build-arg publish=yes -t 'fuzzing-book' fuzzingbook-dockerenv
1 change: 1 addition & 0 deletions deploy/bin/create-student-build
@@ -0,0 +1 @@
docker build --build-arg publish=no -t 'fuzzing-book' fuzzingbook-dockerenv
3 changes: 3 additions & 0 deletions deploy/bin/rm
@@ -0,0 +1,3 @@
docker stop fuzzing-book-instance
docker rm fuzzing-book-instance
docker rmi fuzzing-book
1 change: 1 addition & 0 deletions deploy/bin/run
@@ -0,0 +1 @@
docker run -d -p 8888:8888 --name fuzzing-book-instance fuzzing-book
1 change: 1 addition & 0 deletions deploy/bin/show-url
@@ -0,0 +1 @@
docker exec -it fuzzing-book-instance jupyter notebook list
12 changes: 11 additions & 1 deletion deploy/fuzzingbook-dockerenv/Dockerfile
Expand Up @@ -7,15 +7,19 @@ USER root

# Install required APT packages
RUN apt-get update
RUN apt-get install -y --no-install-recommends graphviz inkscape bc ed texinfo groff wget
RUN apt-get install -y --no-install-recommends graphviz inkscape bc ed texinfo groff wget vim
RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/*

USER $NB_UID

ARG publish=no

# Install required python packages
RUN pip install matplotlib numpy pandas graphviz svglib jupyter_contrib_nbextensions autopep8 mypy notedown nbdime nbstripout

RUN if [ "$publish" = "yes" ]; then pip install ipypublish autopep8 yapf ; fi

# Clone the repo
RUN cd /home/$NB_USER
RUN git clone https://github.com/uds-se/fuzzingbook.git
Expand Down Expand Up @@ -45,6 +49,12 @@ RUN jupyter nbextension enable codefolding/main --user
RUN jupyter nbextension enable execute_time/main --user
RUN jupyter nbextension enable varInspector/main --user
RUN jupyter nbextension enable collapsible_headings/main --user
RUN jupyter nbextension enable select_keymap/main --user
RUN jupyter nbextension enable spellchecker/main --user
RUN jupyter nbextension enable scratchpad/main --user

RUN if [ "$publish" = "yes" ]; then jupyter nbextension enable code_prettify/autopep8 --user ; fi
RUN if [ "$publish" = "yes" ]; then jupyter nbextension enable code_prettify/code_prettify --user ; fi

# run matplotlib once to generate the font cache
RUN python -c "import matplotlib as mpl; mpl.use('Agg'); import pylab as plt; fig, ax = plt.subplots(); fig.savefig('test.png')"
Expand Down

0 comments on commit ba713ce

Please sign in to comment.