test fixes for SELinux (Fedora)

This commit is contained in:
aanno 2021-11-24 16:37:17 +01:00 committed by Muayyad Alsadi
parent 80a47a13d5
commit 17f9ca61bd
11 changed files with 41 additions and 40 deletions

View File

@ -4,7 +4,7 @@ services:
image: busybox
command: busybox httpd -h /var/www/html/ -f -p 8001
volumes:
- ./1.env:/var/www/html/index.txt
- ./1.env:/var/www/html/index.txt:z
env_file: ./1.env
labels:
l1: v1

View File

@ -1,10 +1,11 @@
version: '3'
services:
web1:
image: busybox
env_file: ./12.env
labels:
- l1=v2
- l2=v2
- l1=v2
- l2=v2
environment:
mykey1: myval2
mykey2: myval2
@ -13,6 +14,6 @@ services:
image: busybox
command: busybox httpd -h /var/www/html/ -f -p 8002
volumes:
- ./2.env:/var/www/html/index.txt
- ./2.env:/var/www/html/index.txt:z
env_file: ./2.env

View File

@ -6,16 +6,16 @@ services:
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
working_dir: /var/www/html
ports:
- 8001:8001
- 8001:8001
volumes:
- ./test1.txt:/var/www/html/index.txt:ro
- ./test1.txt:/var/www/html/index.txt:ro,z
web2:
image: busybox
hostname: web1
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
working_dir: /var/www/html
ports:
- 8002:8001
- 8002:8001
volumes:
- ./test2.txt:/var/www/html/index.txt:ro
- ./test2.txt:/var/www/html/index.txt:ro,z

View File

@ -8,16 +8,16 @@ services:
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
working_dir: /var/www/html
ports:
- 8001:8001
- 8001:8001
volumes:
- ./test1.txt:/var/www/html/index.txt:ro
- ./test1.txt:/var/www/html/index.txt:ro,z
web2:
image: busybox
hostname: web2
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
working_dir: /var/www/html
ports:
- 8002:8001
- 8002:8001
volumes:
- ./test2.txt:/var/www/html/index.txt:ro
- ./test2.txt:/var/www/html/index.txt:ro,z

View File

@ -12,9 +12,9 @@ services:
networks:
- net1
ports:
- 8001:8001
- 8001:8001
volumes:
- ./test1.txt:/var/www/html/index.txt:ro
- ./test1.txt:/var/www/html/index.txt:ro,z
web2:
image: busybox
#container_name: web2
@ -25,7 +25,7 @@ services:
- net1
- net2
ports:
- 8002:8001
- 8002:8001
volumes:
- ./test2.txt:/var/www/html/index.txt:ro
- ./test2.txt:/var/www/html/index.txt:ro,z

View File

@ -6,30 +6,30 @@ services:
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
working_dir: /var/www/html
ports:
- 8001:8001
- 8001:8001
volumes:
- ./test1.txt:/var/www/html/index.txt:ro
- ./test1.txt:/var/www/html/index.txt:ro,z
web2:
image: busybox
hostname: web2
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8002"]
working_dir: /var/www/html
ports:
- 8002:8002
- target: 8003
host_ip: 127.0.0.1
published: 8003
protocol: udp
- target: 8004
host_ip: 127.0.0.1
published: 8004
protocol: tcp
- target: 8005
published: 8005
- target: 8006
protocol: udp
- target: 8007
host_ip: 127.0.0.1
- 8002:8002
- target: 8003
host_ip: 127.0.0.1
published: 8003
protocol: udp
- target: 8004
host_ip: 127.0.0.1
published: 8004
protocol: tcp
- target: 8005
published: 8005
- target: 8006
protocol: udp
- target: 8007
host_ip: 127.0.0.1
volumes:
- ./test2.txt:/var/www/html/index.txt:ro
- ./test2.txt:/var/www/html/index.txt:ro,z

View File

@ -8,7 +8,7 @@ services:
- /run
- /tmp
volumes:
- ./print_secrets.sh:/tmp/print_secrets.sh
- ./print_secrets.sh:/tmp/print_secrets.sh:z
secrets:
- my_secret
- my_secret_2

View File

View File

View File

@ -4,7 +4,7 @@ services:
image: redis:alpine
command: ["redis-server", "--appendonly yes", "--notify-keyspace-events", "Ex"]
volumes:
- ./data/redis:/data
- ./data/redis:/data:z
tmpfs: /run1
ports:
- "6379"
@ -25,16 +25,16 @@ services:
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
working_dir: /var/www/html
volumes:
- ./data/web:/var/www/html:ro
- ./data/web:/var/www/html:ro,z
web2:
image: busybox
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8002"]
working_dir: /var/www/html
volumes:
- ~/Downloads/www:/var/www/html:ro
- ~/Downloads/www:/var/www/html:ro,z
web3:
image: busybox
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8003"]
working_dir: /var/www/html
volumes:
- /var/www/html:/var/www/html:ro
- /var/www/html:/var/www/html:ro,z

View File

@ -14,7 +14,7 @@ services:
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
working_dir: /var/www/html
volumes:
- myvol1:/var/www/html:ro
- myvol1:/var/www/html:ro,z
web2:
image: busybox
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8002"]