-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile-crypto
53 lines (42 loc) · 1.49 KB
/
Dockerfile-crypto
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
ARG IMAGE_NAME=kali
FROM sagemath/sagemath:latest
USER root
# the base system
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y vim python3-dev netcat bsdmainutils sshpass gawk bash-completion curl wget unzip htop && \
libgmp3-dev libmpc-dev && \
apt-get clean
# set locales to UTF-8
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y locales && \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen en_US.UTF-8 && \
dpkg-reconfigure --frontend=noninteractive locales && \
/usr/sbin/update-locale LANG=en_US.UTF-8 && \
apt-get clean
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=en_US.UTF-8
# more tools
RUN set -ex && \
mkdir -p /opt/tools && \
\
# https://github.com/Ganapati/RsaCtfTool
curl -o /tmp/RsaCtfTool-master.zip -skL https://codeload.github.com/Ganapati/RsaCtfTool/zip/master && \
unzip -d /opt/tool /tmp/RsaCtfTool-master.zip && \
sudo -u sage /home/sage/sage/local/bin/pip3 install -r /opt/tool/RsaCtfTool-master/requirements.txt && \
rm /tmp/RsaCtfTool-master.zip && \
ln -sf /opt/tool/RsaCtfTool-master/RsaCtfTool.py /usr/local/bin/RsaCtfTool
# must be copied as root
COPY rootme_ssh *-wrapper /usr/local/bin/
USER sage
WORKDIR /home/sage
# the user profile
# RUN ln -f /etc/skel/.bashrc .bashrc
COPY bash_aliases .bash_aliases
COPY vimrc .vimrc
RUN /usr/local/bin/rootme_ssh --add
ARG IMAGE_NAME
VOLUME /${IMAGE_NAME}
WORKDIR /${IMAGE_NAME}
CMD ["bash", "-l"]