-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
82 lines (75 loc) · 1.67 KB
/
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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
ARG PUBLIC_REGISTRY="public.ecr.aws"
ARG ARCH="amd64"
ARG OS="linux"
ARG VER="1.2.9"
ARG AWS_SRC="https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"
ARG BASE_REGISTRY="${PUBLIC_REGISTRY}"
ARG BASE_REPO="arkcase/base"
ARG BASE_VER="8"
ARG BASE_VER_PFX=""
ARG BASE_IMG="${BASE_REGISTRY}/${BASE_REPO}:${BASE_VER_PFX}${BASE_VER}"
FROM "${BASE_IMG}"
#
# Basic Parameters
#
ARG ARCH
ARG OS
ARG VER
ARG AWS_SRC
ARG UID="0"
#
# Some important labels
#
LABEL ORG="Armedia LLC"
LABEL MAINTAINER="Armedia Devops Team <[email protected]>"
LABEL APP="Network Tester"
LABEL VERSION="${VER}"
LABEL IMAGE_SOURCE="https://github.com/ArkCase/ark_nettest"
#
# Full update
#
COPY kubernetes.repo /etc/yum.repos.d/
RUN yum -y install epel-release && \
yum -y install yum-utils which && \
yum-config-manager \
--enable devel \
--enable powertools \
&& \
yum -y install \
bind-utils \
jq \
groff \
kubectl \
less \
nc \
net-tools \
nmap \
openldap-clients \
openssh-clients \
openssl \
python39 \
python39-pyyaml \
python39-requests \
screen \
tcpdump \
telnet \
vim \
wget \
&& \
update-alternatives --set python3 /usr/bin/python3.9 && \
yum -y clean all && \
mkdir -p "/aws" && \
curl "${AWS_SRC}" -o "/aws/awscliv2.zip" && \
cd "/aws" && \
unzip "awscliv2.zip" && \
./aws/install && \
cd / && \
rm -rf "/aws"
COPY nettest.yaml /
COPY --chown=root:root only-once wait-for-ports run-from-env /usr/local/bin/
#
# Final parameters
#
WORKDIR /
USER "${UID}"
ENTRYPOINT [ "/bin/bash" ]