Closed unnsteinngardars closed 1 year ago
The problem in this case is that the devImage allows only root user to write into /app. I will send a PR for the https://github.com/loft-sh/devspace-containers to make /app writeable by any user, so this issue can be assigned to me.
Is there any progress with using non-root users? Having the same issues with a nodejs dockerfile
@unnsteinngardars I think in your case, the image used is a result of the final
build target, and the chown
used in the build
target no longer applies.
Since you already have a build
target, I might suggesting using that as your devImage
. This would allow you to chown
or chmod
/app
as needed.
For example:
images:
app:
image: ghcr.io/blikk-software/app-integrations:1.0.0
dockerfile: ./Dockerfile
app-dev:
image: ghcr.io/blikk-software/app-integrations:1.0.0-dev
dockerfile: ./Dockerfile
target: build
dev:
app:
imageSelector: ghcr.io/blikk-software/app-integrations:1.0.0
devImage: ghcr.io/blikk-software/app-integrations:1.0.0-dev
What happened? I get the following error from the printLogs when I am trying to execute
devspace dev
with my devspace setup created by runningdevspace init
and selecting helm.Upstream - Retry upload because of error: upload archive: upload send: rpc error: code = Unknown desc = untar all: decompress: error creating /app/dapr: mkdir /app/dapr: permission denied
I have successfully deployed and worked on my application by deploying it via kubectl before but now I want to use helm.
What did you expect to happen instead? I don't know if this is expected and I am missing something to resolve it, but at least I would like to be able to have the sync working.. I need to somehow grant the sync process root access or something.
How can we reproduce the bug? (as minimally and precisely as possible) Use the following yaml file, the same Dockerfile if that really is necessary, init devspace using some helm chart, run devspace dev.
My devspace.yaml:
Local Environment:
Client Version: v1.25.0 Kustomize Version: v4.5.7 Server Version: v1.24.0
Anything else we need to know?
As far as I know the root level images configuration entry is not relevant in the case of
devspace dev
, but I do not understand how the dev.app.imageSelector entry works and why it is needed since I only want to use my current directory and two way sync it to the deployed container. But I know that my Dockerfile that is used in the dev.app.imageSelector image is creating a user and giving it permissions to the files and then in the deploy stage of the Dockerfile that user is non existent.