instead of copying the default vars file, that is wrong for nearly everyone, this commit adds a jinja2 template that takes data from the environment fixes #3
This commit is contained in:
parent
feb99f2e78
commit
9eb963b4e2
3 changed files with 11 additions and 2 deletions
|
@ -10,7 +10,9 @@ RUN apk add --no-cache \
|
|||
su-exec \
|
||||
bash \
|
||||
taskd \
|
||||
taskd-pki
|
||||
taskd-pki \
|
||||
py2-pip \
|
||||
&& pip2 install j2cli
|
||||
|
||||
COPY docker/root /
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ if [ ! -f ${TASKDDATA}/config ]; then
|
|||
|
||||
# Copy tools for certificates generation and generate it
|
||||
cp /usr/share/taskd/pki/generate* ${TASKDDATA}/pki
|
||||
cp /usr/share/taskd/pki/vars ${TASKDDATA}/pki
|
||||
j2 /usr/share/taskd/vars.j2 > ${TASKDDATA}/pki/vars
|
||||
cd ${TASKDDATA}/pki
|
||||
./generate
|
||||
cd /
|
||||
|
|
7
docker/root/usr/share/taskd/vars.j2
Normal file
7
docker/root/usr/share/taskd/vars.j2
Normal file
|
@ -0,0 +1,7 @@
|
|||
BITS={{ BITS | default(4096) }}
|
||||
EXPIRATION_DAYS={{ EXPIRATION_DAYS | default(3650) }}
|
||||
ORGANIZATION={{ ORGANIZATION | default("") }}
|
||||
CN={{ CN | default("localhost") }}
|
||||
COUNTRY={{ COUNTRY | default("") }}
|
||||
STATE={{ STATE | default("") }}
|
||||
LOCALITY={{ LOCALITY | default("") }}
|
Loading…
Reference in a new issue