frappe_docker icon indicating copy to clipboard operation
frappe_docker copied to clipboard

Building docker images with sudo git clone for preserving files permission

Open Morakhiyasaiyam opened this issue 2 years ago • 3 comments

Hey so now I am successfully able to build image for arm64 and only erpnext stack build is taking only less then 6 minutes And now with trial and error I took conclusion that there were no any error in Dockerfile It was git who is not preserving files permission when cloning repository without root So i had to clone repository with sudo and then build it successfully.

I have 2 suggestions

  1. Add image build instructions and mention to clone frappe repository with sudo
  2. Add files permission externally in Dockerfile COPY command so they get exact permission if user didn't cloned with sudo

And also you find it appropriate than you can revert my PR. Thanx

Morakhiyasaiyam avatar Jul 17 '22 06:07 Morakhiyasaiyam

can you send a PR as per your suggestion @Morakhiyasaiyam?

@vrslev any comments?

revant avatar Jul 17 '22 23:07 revant

Add files permission externally in Dockerfile COPY command so they get exact permission if user didn't cloned with sudo

can you share the line you used here? If it's minor I'll send the PR.

revant avatar Aug 05 '22 06:08 revant

Add files permission externally in Dockerfile COPY command so they get exact permission if user didn't cloned with sudo

can you share the line you used here? If it's minor I'll send the PR.

Hey As I mentioned when I was investigated some files needed different permission in some COPY command so i will look further and update it in some time and will notify you !

Morakhiyasaiyam avatar Aug 07 '22 03:08 Morakhiyasaiyam

For v14 building images has changed. Create new issue if needed.

revant avatar Sep 10 '22 06:09 revant