2016-06-06 16:19:16 +00:00
|
|
|
from base/archlinux
|
|
|
|
|
2017-08-17 13:48:13 +00:00
|
|
|
RUN cat /etc/pacman.d/mirrorlist \
|
|
|
|
| sed 's/^#Server/Server/' \
|
|
|
|
> /etc/pacman.d/mirrorlist.backup \
|
|
|
|
&& rankmirrors -n 10 /etc/pacman.d/mirrorlist.backup \
|
|
|
|
> /etc/pacman.d/mirrorlist
|
|
|
|
|
2016-06-06 16:19:16 +00:00
|
|
|
RUN echo "[multilib]" >> /etc/pacman.conf
|
|
|
|
RUN echo "Include = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf
|
|
|
|
|
|
|
|
RUN pacman -Syy \
|
|
|
|
&& pacman -S --noconfirm archlinux-keyring \
|
|
|
|
&& pacman -Scc --noconfirm
|
|
|
|
RUN pacman-key --refresh-keys
|
|
|
|
RUN pacman -Syu --noconfirm \
|
|
|
|
&& pacman-db-upgrade \
|
|
|
|
&& pacman -Scc --noconfirm \
|
|
|
|
&& pacman -Syu --noconfirm \
|
|
|
|
&& pacman -Scc --noconfirm
|
|
|
|
RUN trust extract-compat
|
|
|
|
RUN pacman -Syu --noconfirm --needed \
|
|
|
|
curl wget python2 python3 git subversion \
|
|
|
|
python2-pip python-pip \
|
|
|
|
unzip python-virtualenvwrapper \
|
|
|
|
zsh grml-zsh-config \
|
2017-03-08 18:25:38 +00:00
|
|
|
sudo which \
|
2016-06-06 16:19:16 +00:00
|
|
|
&& pacman -Scc --noconfirm
|
|
|
|
|
|
|
|
RUN useradd -m ctf
|
|
|
|
RUN echo "ctf ALL=NOPASSWD: ALL" > /etc/sudoers.d/ctf
|
|
|
|
RUN chsh -s /usr/bin/zsh ctf
|
|
|
|
|
|
|
|
COPY .git /home/ctf/tools/.git
|
|
|
|
RUN chown -R ctf.ctf /home/ctf/tools
|
|
|
|
|
|
|
|
USER ctf
|
|
|
|
|
|
|
|
WORKDIR /home/ctf/tools
|
|
|
|
RUN git checkout .
|
|
|
|
RUN bin/manage-tools -s setup
|
|
|
|
RUN echo 'source $(which virtualenvwrapper.sh)' >> ~/.zshrc
|
|
|
|
RUN echo 'workon ctftools' >> ~/.zshrc
|
|
|
|
|
|
|
|
WORKDIR /home/ctf
|
|
|
|
CMD ["zsh", "-i"]
|