Commit b91f7602 authored by Dariusz Janny's avatar Dariusz Janny
Browse files

[edugain/faas#13] Shibboleth SP base docker instance.

parent b73830ed
/.project
FROM debian:10.7
ARG FAAS_SHIB_IMAGE
ARG FAAS_SHIB_NAME
ARG FAAS_SHIB_VERSION
RUN echo $FAAS_SHIB_IMAGE > /faas-docker-image
RUN echo $FAAS_SHIB_NAME > /faas-docker-name
RUN echo $FAAS_SHIB_VERSION > /faas-docker-version
COPY ./conf/etc/apt/sources.list /etc/apt/sources.list
RUN apt-get -q update && \
apt-get install -y --no-install-recommends apt-utils curl vim rsyslog && \
apt-get install -y libapache2-mod-shib shibboleth-sp-utils shibboleth-sp-common && \
apt-get --yes install supervisor && \
apt-get clean
#ENTRYPOINT ["/etc/entrypoint"]
# import config file
config ?= conf/faas-shib.cnf
include $(config)
export $(shell sed 's/=.*//' $(config))
.DEFAULT_GOAL := help
build: # build container
docker build -t ${FAAS_SHIB_IMAGE} --build-arg FAAS_SHIB_NAME=${FAAS_SHIB_NAME} --build-arg FAAS_SHIB_IMAGE=${FAAS_SHIB_IMAGE} --build-arg FAAS_SHIB_VERSION=${FAAS_SHIB_VERSION} .
build-nc: # build container without caching
docker build --no-cache -t ${FAAS_SHIB_IMAGE} --build-arg FAAS_SHIB_NAME=${FAAS_SHIB_NAME} --build-arg FAAS_SHIB_IMAGE=${FAAS_SHIB_IMAGE} --build-arg FAAS_SHIB_VERSION=${FAAS_SHIB_VERSION} .
run: # run container
docker run -i -t --detach --rm --env-file=$(config) --name="${FAAS_SMTP_NAME}" ${FAAS_SHIB_IMAGE}
run-nd: # run container in no-deamon mode
docker run -i -t --rm --env-file=$(config) --name="${FAAS_SHIB_NAME}" ${FAAS_SHIB_IMAGE}
up: build run # build and run container
logs: # print docker logs
docker logs ${FAAS_SHIB_NAME}
stop: # stop container
docker stop ${FAAS_SHIB_NAME}
version: # print current component version
@echo ${FAAS_SHIB_VERSION}
help: # this help
@awk 'BEGIN {FS = ":.*?# "} /^[a-zA-Z_-]+:.*?# / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
# FaaS-shib
# FaaS-SHIB
Build docker image with sebian (10.7) and Shibboleth Service Provider (3.2.0)
## structure
`_conf/`_ - directory with configuration files
## build image
To build `faas-shib` docker image
`
make build
`
## run image
To run `faas-shib` docker image
`
make run
`
## additional commands
```
build build container
build-nc build container without caching
run run container
run-nd run container in no-deamon mode
up build and run container
logs print docker logs
stop stop container
version print current component version
```
# deb http://snapshot.debian.org/archive/debian/20210111T000000Z buster main
deb http://deb.debian.org/debian testing main
# deb http://snapshot.debian.org/archive/debian-security/20210111T000000Z buster/updates main
deb http://security.debian.org/debian-security buster/updates main
# deb http://snapshot.debian.org/archive/debian/20210111T000000Z buster-updates main
deb http://deb.debian.org/debian buster-updates main
FAAS_SHIB_REPO=faas
FAAS_SHIB_NAME=faas-shib
FAAS_SHIB_VERSION=1.0-SNAPSHOT
FAAS_SHIB_IMAGE=${FAAS_SHIB_REPO}/${FAAS_SHIB_NAME}:${FAAS_SHIB_VERSION}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment