tests - fix Linux systemd bug when writing to /tmp folder
This commit is contained in:
parent
2b3b4a5c3f
commit
6c8bc6b349
9
.github/workflows/build-bunkerized-nginx.yml
vendored
9
.github/workflows/build-bunkerized-nginx.yml
vendored
@ -17,11 +17,6 @@ jobs:
|
|||||||
- name: Temp build to check security issues
|
- name: Temp build to check security issues
|
||||||
run: docker build -t bunkerized-nginx .
|
run: docker build -t bunkerized-nginx .
|
||||||
|
|
||||||
# Temp ignore CVE-2021-36159
|
|
||||||
#- name: Temp add .trivyignore
|
|
||||||
# run: |
|
|
||||||
# echo "CVE-2021-36159" > .trivyignore
|
|
||||||
|
|
||||||
- name: Run Trivy security scanner
|
- name: Run Trivy security scanner
|
||||||
uses: aquasecurity/trivy-action@master
|
uses: aquasecurity/trivy-action@master
|
||||||
with:
|
with:
|
||||||
@ -31,10 +26,6 @@ jobs:
|
|||||||
ignore-unfixed: true
|
ignore-unfixed: true
|
||||||
severity: 'UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL'
|
severity: 'UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL'
|
||||||
|
|
||||||
#- name: Temp remove .trivyignore
|
|
||||||
# run: |
|
|
||||||
# rm -f .trivyignore
|
|
||||||
|
|
||||||
- name: Run autotest
|
- name: Run autotest
|
||||||
run: docker run bunkerized-nginx test
|
run: docker run bunkerized-nginx test
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/linux-bunkerized-nginx.yml
vendored
4
.github/workflows/linux-bunkerized-nginx.yml
vendored
@ -16,6 +16,8 @@ jobs:
|
|||||||
run: docker build -t debian-systemd -f tests/Dockerfile-debian .
|
run: docker build -t debian-systemd -f tests/Dockerfile-debian .
|
||||||
- name: Build Ubuntu with systemd
|
- name: Build Ubuntu with systemd
|
||||||
run: docker build -t ubuntu-systemd -f tests/Dockerfile-ubuntu .
|
run: docker build -t ubuntu-systemd -f tests/Dockerfile-ubuntu .
|
||||||
|
- name: Build CentOS with systemd
|
||||||
|
run: docker build -t centos-systemd -f tests/Dockerfile-centos .
|
||||||
- name: Build Fedora with systemd
|
- name: Build Fedora with systemd
|
||||||
run: docker build -t fedora-systemd -f tests/Dockerfile-fedora .
|
run: docker build -t fedora-systemd -f tests/Dockerfile-fedora .
|
||||||
- name: Debian test
|
- name: Debian test
|
||||||
@ -23,6 +25,6 @@ jobs:
|
|||||||
- name: Ubuntu test
|
- name: Ubuntu test
|
||||||
run: ./tests/linux-run.sh ubuntu-systemd test-ubuntu
|
run: ./tests/linux-run.sh ubuntu-systemd test-ubuntu
|
||||||
- name: CentOS test
|
- name: CentOS test
|
||||||
run: ./tests/linux-run.sh centos:7 test-centos
|
run: ./tests/linux-run.sh centos-systemd test-centos
|
||||||
- name: Fedora test
|
- name: Fedora test
|
||||||
run: ./tests/linux-run.sh fedora-systemd test-fedora
|
run: ./tests/linux-run.sh fedora-systemd test-fedora
|
||||||
|
|||||||
11
tests/Dockerfile-centos
Normal file
11
tests/Dockerfile-centos
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM centos:7
|
||||||
|
|
||||||
|
|
||||||
|
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||||
|
rm -f /lib/systemd/system/multi-user.target.wants/*;\
|
||||||
|
rm -f /etc/systemd/system/*.wants/*;\
|
||||||
|
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||||
|
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||||
|
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||||
|
rm -f /lib/systemd/system/basic.target.wants/*;\
|
||||||
|
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||||
@ -1,3 +1,12 @@
|
|||||||
FROM debian:buster-slim
|
FROM debian:buster-slim
|
||||||
|
|
||||||
RUN apt update && apt install -y systemd
|
RUN apt update && apt install -y systemd
|
||||||
|
|
||||||
|
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||||
|
rm -f /lib/systemd/system/multi-user.target.wants/*;\
|
||||||
|
rm -f /etc/systemd/system/*.wants/*;\
|
||||||
|
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||||
|
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||||
|
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||||
|
rm -f /lib/systemd/system/basic.target.wants/*;\
|
||||||
|
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||||
|
|||||||
@ -1,3 +1,12 @@
|
|||||||
FROM fedora:34
|
FROM fedora:34
|
||||||
|
|
||||||
RUN dnf install -y systemd
|
RUN dnf install -y systemd
|
||||||
|
|
||||||
|
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||||
|
rm -f /lib/systemd/system/multi-user.target.wants/*;\
|
||||||
|
rm -f /etc/systemd/system/*.wants/*;\
|
||||||
|
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||||
|
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||||
|
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||||
|
rm -f /lib/systemd/system/basic.target.wants/*;\
|
||||||
|
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||||
|
|||||||
@ -1,3 +1,12 @@
|
|||||||
FROM ubuntu:focal
|
FROM ubuntu:focal
|
||||||
|
|
||||||
RUN apt update && apt install -y systemd
|
RUN apt update && apt install -y systemd
|
||||||
|
|
||||||
|
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||||
|
rm -f /lib/systemd/system/multi-user.target.wants/*;\
|
||||||
|
rm -f /etc/systemd/system/*.wants/*;\
|
||||||
|
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||||
|
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||||
|
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||||
|
rm -f /lib/systemd/system/basic.target.wants/*;\
|
||||||
|
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user