Skip to content

Commit 1485da7

Browse files
author
tester bester
committed
debian ubuntu init
1 parent 5b29a0a commit 1485da7

File tree

2 files changed

+139
-0
lines changed

2 files changed

+139
-0
lines changed

.github/workflows/debian-wf.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: "centos stream docker nagios CI workflow"
2+
3+
4+
on:
5+
push:
6+
branches: [ test ]
7+
8+
9+
jobs:
10+
11+
centos-9-nagios-job:
12+
name: "nagios centos stream 9 image ubuntu latest"
13+
runs-on: ubuntu-latest
14+
env:
15+
version: "latest"
16+
name: "centos-stream9/nagios"
17+
dockerdir: "dockerfiles/3"
18+
dockerfile: "Dockerfile.centos.stream9"
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: "os fingerprinting"
22+
run: |
23+
hostnamectl status
24+
lsb_release -a
25+
lsb_release -d
26+
cat /etc/lsb-release
27+
cat /etc/issue
28+
cat /etc/os-release
29+
sudo apt-get install -y neofetch && neofetch
30+
- name: "docker build nagios base"
31+
run: |
32+
# destroyed afterwards (use --rm )
33+
# all subsequent Dockerfile commands generate new images and the cache is not used
34+
sudo docker build --no-cache --rm -t ${name}:${version} . --file ${dockerdir}/${dockerfile}
35+
docker image ls
36+
docker image history ${name}:${version}
37+
docker system df -v
38+
docker image inspect ${name}:${version}
39+
- name: "docker scan trivy archlinux base "
40+
run: |
41+
# destroyed afterwards (use --rm )
42+
# all subsequent Dockerfile commands generate new images and the cache is not used
43+
sudo docker build --no-cache --rm -t ${name}:${version} . --file ${dockerdir}/${dockerfile}
44+
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/master/contrib/install.sh | sudo sh -s -- -b /usr/local/bin
45+
trivy image ${name}:${version}
46+
47+
centos-8-nagios-job:
48+
name: "nagios centos stream 8 image ubuntu latest"
49+
runs-on: ubuntu-latest
50+
env:
51+
version: "latest"
52+
name: "debian-bookworm/nagios"
53+
dockerdir: "dockerfiles/3"
54+
dockerfile: "Dockerfile.debian.bookworm"
55+
steps:
56+
- uses: actions/checkout@v2
57+
- name: "os fingerprinting"
58+
run: |
59+
hostnamectl status
60+
lsb_release -a
61+
lsb_release -d
62+
cat /etc/lsb-release
63+
cat /etc/issue
64+
cat /etc/os-release
65+
sudo apt-get install -y neofetch && neofetch
66+
- name: "docker build nagios base"
67+
run: |
68+
# destroyed afterwards (use --rm )
69+
# all subsequent Dockerfile commands generate new images and the cache is not used
70+
sudo docker build --no-cache --rm -t ${name}:${version} . --file ${dockerdir}/${dockerfile}
71+
docker image ls
72+
docker image history ${name}:${version}
73+
docker system df -v
74+
docker image inspect ${name}:${version}
75+
- name: "docker scan trivy archlinux base "
76+
run: |
77+
# destroyed afterwards (use --rm )
78+
# all subsequent Dockerfile commands generate new images and the cache is not used
79+
sudo docker build --no-cache --rm -t ${name}:${version} . --file ${dockerdir}/${dockerfile}
80+
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/master/contrib/install.sh | sudo sh -s -- -b /usr/local/bin
81+
trivy image ${name}:${version}
82+
83+
84+
85+
86+
87+
88+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
FROM debian@sha256:731dd1380d6a8d170a695dbeb17fe0eade0e1c29f654cf0a3a07f372191c3f4b
2+
LABEL maintainer="githubfoam"
3+
4+
ENV NAGIOS_HOME=/opt/nagios
5+
ENV NAGIOS_USER=nagios
6+
ENV NAGIOS_GROUP=nagios
7+
ENV NAGIOS_CMDUSER=nagios
8+
ENV NAGIOS_CMDGROUP=nagios
9+
ENV NAGIOS_FQDN=nagios.example.com
10+
ENV NAGIOSADMIN_USER=nagiosadmin
11+
ENV NAGIOSADMIN_PASS=nagios
12+
ENV APACHE_RUN_USER=nagios
13+
ENV APACHE_RUN_GROUP=nagios
14+
ENV NAGIOS_TIMEZONE=UTC
15+
ENV DEBIAN_FRONTEND=noninteractive
16+
ENV NG_NAGIOS_CONFIG_FILE=${NAGIOS_HOME}/etc/nagios.cfg
17+
ENV NG_CGI_DIR=${NAGIOS_HOME}/sbin
18+
ENV NG_WWW_DIR=${NAGIOS_HOME}/share/nagiosgraph
19+
ENV NG_CGI_URL=/cgi-bin
20+
ENV NAGIOS_BRANCH=nagios-4.5.9
21+
ENV NAGIOS_PLUGINS_BRANCH=release-2.4.12
22+
ENV NRPE_BRANCH=nrpe-4.1.3
23+
ENV NCPA_BRANCH=v3.1.3
24+
ENV NSCA_BRANCH=nsca-2.10.2
25+
ENV NAGIOSTV_VERSION=0.9.2
26+
27+
RUN apt-get update && \
28+
apt-get install -y --no-install-recommends \
29+
apache2 \
30+
apache2-utils \
31+
build-essential \
32+
ca-certificates \
33+
curl \
34+
gcc \
35+
gnupg2 \
36+
libapache2-mod-php \
37+
libgd-dev \
38+
libmcrypt-dev \
39+
libssl-dev \
40+
make \
41+
mariadb-client \
42+
mariadb-server \
43+
nagios-nrpe-plugin \
44+
openssl \
45+
php-cli \
46+
php-curl \
47+
php-gd \
48+
php-mbstring \
49+
php-mysql \
50+
php-xmlrpc && \
51+
rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)