forked from kheeklab/privacyidea-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (22 loc) · 839 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
info:
@echo "build build the privacyidea image"
@echo "push push the image to the docker hub"
LOCAL_DATA_VOLUME=/tmp/privacyidea-data
build:
docker build -t khalibre/privacyidea:dev .
push:
docker push michimau/privacyidea
run: cleanup create_volume secretkey pipepper
docker run -p 80:80 -p 443:443 -ti --name=privacyidea-dev --env-file=secretkey --env-file=pipepper khalibre/privacyidea:dev
create_volume:
mkdir $(LOCAL_DATA_VOLUME)
secretkey:
@echo Creating secretkey
@echo SECRET_KEY=$(shell cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) > secretkey
pipepper:
@echo Creating pipepper
@echo PI_PEPPER=$(shell cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) > pipepper
cleanup:
docker stop privacyidea-dev || true
docker rm privacyidea-dev || true
sudo rm -rf $(LOCAL_DATA_VOLUME)