-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
39 lines (29 loc) · 925 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM sagemath/sagemath:latest
USER root
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends \
netcat \
tmux \
vim \
&& rm -rf /var/lib/apt/lists/*
USER sage
RUN sage -pip install \
pwntools \
pyCryptoDome \
z3-solver
COPY --chown=sage:sage cryptohack_example.ipynb .
COPY --chown=sage:sage z3_example.ipynb .
COPY --chown=sage:sage custom.css /home/sage/.sage/jupyter-4.1/custom/custom.css
ENV PWNLIB_NOTERM=true
ENV BLUE='\033[0;34m'
ENV YELLOW='\033[1;33m'
ENV RED='\e[91m'
ENV NOCOLOR='\033[0m'
ENV BANNER=" \n\
${BLUE}----------------------------------${NOCOLOR} \n\
${YELLOW}CryptoHack Docker Container${NOCOLOR} \n\
\n\
${RED}After Jupyter starts, visit http://127.0.0.1:8888${NOCOLOR} \n\
${BLUE}----------------------------------${NOCOLOR} \n\
"
CMD ["echo -e $BANNER && sage -n jupyter --NotebookApp.token='' --no-browser --ip='0.0.0.0' --port=8888"]