first commit
This commit is contained in:
11
test/Dockerfile
Normal file
11
test/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
#checkov:skip=CKV_DOCKER_2: required
|
||||
FROM alpine:3
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY entrypoint.sh .
|
||||
RUN chmod +x entrypoint.sh
|
||||
|
||||
CMD ["/bin/sh", "entrypoint.sh"]
|
||||
|
||||
USER 1000:1000
|
||||
4
test/docker-compose-fail.yml
Normal file
4
test/docker-compose-fail.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
services:
|
||||
service-a:
|
||||
image: busybox
|
||||
command: ["sh", "-c", "exit 1"]
|
||||
23
test/docker-compose-web-mysql.yml
Normal file
23
test/docker-compose-web-mysql.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
volumes:
|
||||
- .:/app
|
||||
- /app/vendor
|
||||
environment:
|
||||
- DB_HOST=mysql
|
||||
- DB_USER=root
|
||||
- DB_PASSWORD=12345
|
||||
- DATABASE=testing
|
||||
depends_on:
|
||||
- mysql
|
||||
|
||||
mysql:
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
- MYSQL_HOST=127.0.0.1
|
||||
- MYSQL_USER=root
|
||||
- MARIADB_ROOT_PASSWORD=12345
|
||||
- MYSQL_DB=testing
|
||||
7
test/docker-compose-with-env.yml
Normal file
7
test/docker-compose-with-env.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
volumes:
|
||||
test_volume: {}
|
||||
|
||||
services:
|
||||
service-a:
|
||||
image: ${IMAGE_NAME}
|
||||
command: ["tail", "-f", "/dev/null"]
|
||||
5
test/docker-compose.ci.yml
Normal file
5
test/docker-compose.ci.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
services:
|
||||
service-d:
|
||||
image: busybox
|
||||
command: ["tail", "-f", "/dev/null"]
|
||||
profiles: [profile-2]
|
||||
17
test/docker-compose.yml
Normal file
17
test/docker-compose.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
service-a:
|
||||
image: busybox
|
||||
command: ["tail", "-f", "/dev/null"]
|
||||
volumes:
|
||||
- test_volume:/test:Z
|
||||
service-b:
|
||||
image: busybox
|
||||
command: ["tail", "-f", "/dev/null"]
|
||||
profiles: [profile-1]
|
||||
service-c:
|
||||
image: busybox
|
||||
command: ["tail", "-f", "/dev/null"]
|
||||
profiles: [profile-2]
|
||||
|
||||
volumes:
|
||||
test_volume: {}
|
||||
13
test/entrypoint.sh
Normal file
13
test/entrypoint.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
sleep 2 && cat <<EOF
|
||||
_________________________________________________
|
||||
< It works! >
|
||||
< --abort-on-container-exit --exit-code-from=web >
|
||||
-------------------------------------------------
|
||||
\ ^__^
|
||||
\ (oo)\_______
|
||||
(__)\ )\\/\\
|
||||
||----w |
|
||||
|| ||
|
||||
EOF
|
||||
Reference in New Issue
Block a user