Documentation not clear about docker installation
fmalfatto opened this issue · 7 comments
I installed the docker image on a Opensuse Leap15.1 but after building the container I do not know how to copy the config file.
The statement cp conf/config.yaml.example conf/config.yaml where has to be run?
In the container folder I only have two files: idp.key and idp. cert.
The log says : ERROR:testenv.log:Impossibile accedere al file di configurazione: ./conf/config.yaml
You need to copy the file into the directory you've bound as /app/conf
. If you followed the README example and used /etc/spid-testenv2/
:
$ cp conf/config.yaml.example /etc/spid-testenv2/config.yaml
Alternatively, if you apply #269 it's done automatically.
I followed the README and my dir is /dati/spid-testenv2/ so I did (as root):
# mkdir /dati/spid-testenv2
# cd /dati
# docker create --name spid-testenv2 -p 8088:8088 --restart=always --mount src="/dati/spid-testenv2",target="/app/conf",type=bind italia/spid-testenv2
But in /dati/spid/testenv2 there is no conf/config.yaml
# # ls -la spid-testenv2/
total 8
drwxr-xr-x 2 root root 36 Dec 4 21:13 .
drwxr-xr-x 4 root root 58 Dec 4 20:27 ..
-rw-r--r-- 1 root root 1094 Dec 4 21:13 idp.crt
-rw------- 1 root root 1704 Dec 4 21:13 idp.key
So I think that before to do the cp command I should move to cd some_folder, otherwise I cannot
copy conf/config.yaml that has a relative path.
I have read #269 and his link to fix #238 but I see no solution to the missing config file
/dati/spid-testenv2/
is conf/
inside the container. Just use:
$ cp WHERE_THE_SOURCE_IS/conf/config.yaml.example /dati/spid-testenv2/config.yaml
This way ?
# find /var/lib/docker/ -name 'config.yaml.example'
/var/lib/docker/overlay2/b532830734a596708a20886c7e89b8c57717e68f5d413f920bebac56bc7571e2/diff/app/conf/config.yaml.example
# cp /var/lib/docker/overlay2/b532830734a596708a20886c7e89b8c57717e68f5d413f920bebac56bc7571e2/diff/app/conf/config.yaml.example /dati/spid-testenv2/
Something like:
$ git clone https://github.com/italia/spid-testenv2.git
$ cd spid-testenv2
# cp conf/config.yaml.example /dati/spid-testenv2/config.yaml
Reading the doc I thought that following the docker installation I already downloaded the image during the "docker create --name spid-testenv2 " step. In effect I can list both the spid-testenv2 image and the container in my docker installation. Do you mean that I must download the source also outside of the docker ? The Readme does not tell that:
Alternativamente alla procedura di installazione manuale è possible installare ed eseguire l'Identity Provider di test usando l'immagine presente su Docker Hub.
You're correct, you don't need the source, I was using it as an example of where you can find config.yaml.example
You can also get it from here: https://raw.githubusercontent.com/italia/spid-testenv2/master/conf/config.yaml.example