-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
67 lines (57 loc) · 2.22 KB
/
Dockerfile
File metadata and controls
67 lines (57 loc) · 2.22 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# syntax=docker/dockerfile:1.6
FROM debian:13-slim
ENV DEBIAN_FRONTEND=noninteractive \
PATH="/opt/venv/bin:${PATH}" \
PIP_NO_CACHE_DIR=1
# Repos + all packages in one go; no grenml, no build deps needed
RUN set -eux; \
printf "Types: deb\nURIs: http://deb.debian.org/debian\nSuites: stable\nComponents: main contrib non-free non-free-firmware\n\n\
Types: deb\nURIs: http://security.debian.org/debian-security\nSuites: stable-security\nComponents: main contrib non-free non-free-firmware\n\n\
Types: deb\nURIs: http://deb.debian.org/debian\nSuites: stable-updates\nComponents: main contrib non-free non-free-firmware\n" \
> /etc/apt/sources.list.d/debian.sources; \
apt-get update; \
apt-get install -y --no-install-recommends \
ca-certificates gnupg dirmngr \
curl wget vim man \
iproute2 iputils-ping iputils-arping iputils-tracepath net-tools \
netcat-openbsd traceroute mtr-tiny nmap tcpdump dnsutils whois \
snmp snmp-mibs-downloader \
tftp-hpa \
git ack \
ldap-utils cifs-utils \
minicom \
iperf3 \
openssh-client \
# Python runtime + apt-provided libs you want
python3 python3-venv python3-pip \
python3-geopy python3-openpyxl python3-scapy python3-paramiko python3-xmltodict \
# Infra tools
ansible \
; \
rm -rf /var/lib/apt/lists/*
# Lightweight venv and the two pip packages you still need
RUN set -eux; \
python3 -m venv /opt/venv; \
/opt/venv/bin/python -m pip install --upgrade pip setuptools wheel; \
/opt/venv/bin/pip install --no-cache-dir \
jsonparse \
simplekml
# Customize bash prompt
RUN rm /root/.bashrc
COPY config/.bashrc /root/.bashrc
# Create ~/.ssh folder for ssh keys
RUN mkdir /root/.ssh
# Customize vim
COPY vimconfig/.vimrc-plugins /root/.vimrc
RUN mkdir /root/.vim
RUN ln -s /root/.vim /root/.vimfiles
RUN curl -fLo /root/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
RUN git clone https://github.com/VundleVim/Vundle.vim.git /root/.vim/bundle/Vundle.vim
RUN vim +PlugInstall +qall
RUN vim +PluginInstall +qall
COPY vimconfig/.vimrc /root/.vimrc
# Upgrade packages
RUN apt-get -yqq upgrade
# Setup environment variables
ENV TERM=xterm-256color
CMD ["ssh-agent", "/bin/bash"]