Commit
* Update Shib SP base image * Update CentOS7 repos and test infrastructure * Replace CentOS7 sample app image with official PHP image * Replace ldap,shib idp with simplesamlphp idp * Replace testing image and add selenium standalone image * Test should run in headless mode * Streamline test/release/clean * Update Quickstart
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# This is the main interface into the repository for building the image of the Shibboleth SP reverse proxy. | ||
# | ||
# All targets assume they're running on a Linux or macOS host with Bash and Docker installed. | ||
# Any other dependencies should be satisfied by containers. | ||
# | ||
|
||
.DEFAULT_GOAL := help | ||
|
||
DEBUG = [DEBUG] | ||
INFO = [INFO] | ||
SUCCESS = [INFO] | ||
|
||
VERSION := $(shell cat VERSION.txt) | ||
|
||
compose := docker compose | ||
|
||
.PHONY: all | ||
all: build | ||
|
||
.PHONY: build | ||
build: ## Build the Docker image | ||
$(compose) build proxy | ||
@echo "$(SUCCESS) Successfully built!" | ||
|
||
.PHONY: clean | ||
clean: ## Remove build artifacts | ||
$(compose) down --rmi all | ||
@echo "$(SUCCESS) All clean!" | ||
|
||
.PHONY: help | ||
help: ## Display this help (default) | ||
@echo "Targets:" | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort \ | ||
| awk 'BEGIN {FS = ":.*?## "}; {printf " %-17s%s\n", $$1, $$2}' | ||
|
||
.PHONY: release | ||
release: ## Build the Docker image with the tagged version for release | ||
VERSION=${VERSION} $(compose) build proxy | ||
@docker images --format "{{.Repository}}:{{.Tag}}" | grep '^shib-proxy:' | \ | ||
while read -r line; do \ | ||
tag=$$(echo $$line | awk -F: '{print $$2}'); \ | ||
if [ "$$tag" != "$(VERSION)" ]; then \ | ||
echo "${INFO} Removing tag - $$tag"; \ | ||
docker rmi shib-proxy:$$tag; \ | ||
fi \ | ||
done | ||
@echo "$(SUCCESS) Successfully built!" | ||
|
||
.PHONY: test | ||
test: ## Run the tests on the proxy Docker image | ||
$(compose) up -d selenium-firefox | ||
@echo "${INFO} Waiting for services to come up..." | ||
@sleep 30 | ||
$(compose) up test | ||
$(compose) down |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.0.2 |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,4 @@ | ||
# Application Container | ||
FROM centos:7 | ||
|
||
RUN yum -y update && \ | ||
yum install -y httpd php && \ | ||
yum clean all | ||
|
||
COPY container_files/httpd.conf /etc/httpd/conf/httpd.conf | ||
COPY container_files/app.conf /etc/httpd/conf.d/app.conf | ||
COPY container_files/html/ /var/www/html/ | ||
|
||
CMD ["httpd", "-D", "FOREGROUND"] | ||
FROM php:8 | ||
COPY index.php /usr/src/test-app/ | ||
WORKDIR /usr/src/test-app | ||
CMD [ "php", "-S", "0.0.0.0:80" ] |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
header('Content-type: application/json'); | ||
|
||
$headers = apache_request_headers(); | ||
|
||
$data = array( | ||
"headers" => $headers, | ||
); | ||
|
||
$json = json_encode($data); | ||
|
||
echo $json; | ||
|
||
?> |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.