-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
66 lines (58 loc) · 2.06 KB
/
Dockerfile
File metadata and controls
66 lines (58 loc) · 2.06 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
# syntax=docker.io/docker/dockerfile-upstream:1.9.0
# check=error=true
FROM quay.io/centos/centos:stream9@sha256:b99dfd34a0bb6ab79c59d3b2e6d8782bf254eec7a58f5533ce4b1cf8de6c90d0
LABEL org.opencontainers.image.title="Debug Container" \
org.opencontainers.image.authors="Phil Huang <phil.huang@microsoft.com>" \
org.opencontainers.image.source="https://github.com/pichuang/debug-container" \
org.opencontainers.image.description="A short and concise Container Troubleshooting Tool that is updated daily" \
org.opencontainers.image.vendor="divecode.in" \
org.opencontainers.image.url="ghcr.io/pichuang/debug-container:master" \
org.opencontainers.image.documentation="https://github.com/pichuang/debug-container"
# Install packages and clean up in one layer
# hadolint ignore=DL3033
RUN yum -y install epel-release && \
rpmkeys --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-9 && \
yum -y update && \
yum -y --allowerasing install \
python3.11 \
python3.11-pip \
iputils \
mtr \
net-tools \
htop \
vim \
git \
bind-utils \
iproute \
nmap-ncat \
wget \
curl \
tcpdump \
sysstat \
numactl \
hping3 \
dnsperf \
jq \
speedtest-cli \
iperf3 \
procps-ng \
nmap \
ethtool && \
yum -y clean all && \
rm -rf /var/cache/yum && \
rm /root/anaconda-ks.cfg /root/anaconda-post.log /root/original-ks.cfg /root/anaconda-post-nochroot.log
# Clone repository (pinned to specific commit for supply chain security)
RUN git clone https://github.com/upa/deadman.git /root/deadman && \
cd /root/deadman && \
git checkout 4746fd6aae3625b44e19cb3cac566e0544c04dc9
# Set motd
COPY motd /etc/motd
RUN echo "cat /etc/motd" >> ~/.bashrc
EXPOSE 5566
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD ["bash", "-c", "echo healthy || exit 1"]
# hadolint ignore=DL3002
USER root
WORKDIR /root
ENV HOSTNAME=debug-container
CMD ["/bin/bash", "-l"]