Build-fail test example

Signed-off-by: BugFest <bugfest.dev@pm.me>
This commit is contained in:
BugFest 2023-04-12 19:33:53 +02:00 committed by Muayyad Alsadi
parent 5a3bdbf89b
commit 5d279c4948
2 changed files with 2 additions and 31 deletions

View File

@ -1,9 +0,0 @@
FROM busybox
ARG buildno=1
ARG httpd_port=80
ARG other_variable=not_set
ENV httpd_port ${httpd_port}
ENV other_variable ${other_variable}
RUN mkdir -p /var/www/html/ && \
echo "ALT buildno=$buildno port=$httpd_port `date -Iseconds`" > /var/www/html/index.txt
CMD httpd -f -p "$httpd_port" -h /var/www/html

View File

@ -1,25 +1,5 @@
version: "3"
services:
web1:
test:
build: ./context
image: my-busybox-httpd
ports:
- 8080:80
web2:
build:
context: ./context
dockerfile: Dockerfile-alt
labels:
mykey: myval
args:
buildno: 2
httpd_port: 8000
image: my-busybox-httpd2
ports:
- 8000:8000
test_build_arg_argument:
build:
context: ./context
dockerfile: Dockerfile-alt
image: my-busybox-httpd2
command: env
image: build-fail-img