Skip to content

Local development issue with Docker, Composer and file permissions #50

@SOHELAHMED7

Description

@SOHELAHMED7

Enter into bash shell of a Docker container:

docker-compose exec --user=$(id -u) php bash

Run

composer remove <package>

Below error is faced:

In JsonFile.php line 184:
                                                                                
  file_put_contents(./composer.lock): failed to open stream: Permission denied  
   

Need few changes Dockerfile related to permission of files.


Similar issue: serversideup/docker-php#179


Temporary workaround:

# enter in CLI using root user in Docker container
docker-compose exec --user="root" php bash

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions