X-Road
X-Road copied to clipboard
docker build failed - missing directories
docker build is failing at lines 48-49. Those directories are missing: /home/, /etc/.
Here is the Dockerfile: (https://github.com/nordic-institute/X-Road/blob/develop/Docker/centralserver/Dockerfile)
and here is the problem:
Facing the same issue with building and setting up my docker container , tried creating certs on my local machine and use them in localhost:4001 ,still doesnt work
did you find any solution for this issue ?
Hi @HsnAlwayel! Have you tried running the Central Server image that's available in Docker Hub? In that way, there's no need to build the image locally.
You can spin up a new Central Server container using this command:
docker run -p 4000:4000 -p 4001:80 -p 4002:9998 --name cs niis/xroad-central-server
Regards, Petteri
But that image can't be used in a production environment!
The content of home
directory were moved to ansible/roles/xroad-ca/files/home/ca
directory. I copied those CA
& TSA
directories inside home
but not sure about etc
directory.
https://github.com/nordic-institute/X-Road/tree/6d466b8d67fe5a3456fb3bbc2ff88bd9336b1241/ansible/roles/xroad-ca/files/home/ca
The etc
directory is needed too. Have you run the init_context.sh
script before building the image and are you running the build command in the build
folder? I was able to build the image successfully using the commands below.
cd Docker/centralserver/
./init_context.sh
cd build/
docker build --build-arg DIST=jammy-current -t centralserver -f ../Dockerfile .
Also, please note that building the image by yourself without changing it doesn't make it any more suitable to a production environment compared to the image available on Docker Hub.
Where is the content of etc
directory? I use go to file
tools but not sure.
It's here:
https://github.com/nordic-institute/X-Road/tree/develop/ansible/roles/xroad-ca/files
You can see it by looking at the init_context.sh
script:
https://github.com/nordic-institute/X-Road/blob/develop/Docker/centralserver/init_context.sh
Thank you so much.