Skip to content

Commit

Permalink
Nginx distroless fix (#358)
Browse files Browse the repository at this point in the history
* Added common-commands for nginx ironbank

Signed-off-by: Anmol Virdi <anmolvirdi70@gmail.com>

* Added distroless condition

Signed-off-by: Anmol Virdi <anmolvirdi70@gmail.com>

* Removed unncessary files

Signed-off-by: Anmol Virdi <anmolvirdi70@gmail.com>

* Shellcheck fix

Signed-off-by: Anmol Virdi <anmolvirdi70@gmail.com>

---------

Signed-off-by: Anmol Virdi <anmolvirdi70@gmail.com>
  • Loading branch information
AnmolVirdi authored Sep 27, 2023
1 parent 6b3c54a commit 2691f4c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion community_images/nginx/ironbank/dc_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ CONTAINER_NAME="${PROJECT_NAME}"-nginx-1
docker exec -i "${CONTAINER_NAME}" nginx -s reload
sleep 10
docker exec -i "${CONTAINER_NAME}" nginx -t
docker exec -i "${CONTAINER_NAME}" /tmp/common_commands.sh

# Condition to handle distroless container
TAG_NAME=$(jq -r '.runtime_props.image_keys.nginx-ib.tag' < "$JSON_PARAMS")
if [[ "$TAG_NAME" != *distroless* ]]; then
docker exec -i "${CONTAINER_NAME}" /tmp/common_commands.sh
fi

# find non-tls and tls port
docker inspect "${CONTAINER_NAME}" | jq -r ".[].NetworkSettings.Ports.\"8080/tcp\"[0].HostPort"
Expand Down

0 comments on commit 2691f4c

Please sign in to comment.