Hey I'm using garden acorn, I want to run my devM...
# 🤖|ask-kapa
m
Please stand by @bright-policeman-43626 as I search the knowledge base. I normally take about 20 seconds or so. :wave:
---------------------- Garden does not directly control the user that your Docker container runs as. This is typically specified in your Dockerfile, as you've done with the
USER root
directive. However, if you're experiencing issues, it might be due to other factors. One thing to note is that Garden uses a sync mechanism for live reloading changes into running Pods in the remote cluster, without needing a full re-build or re-deploy on every code change. This could potentially cause issues if the sync process doesn't have the necessary permissions. If you're still having trouble, it might be helpful to check the configuration of your Garden project. For instance, you can specify the Dockerfile and its location in your
garden.yml
file. Here's an example of how to do that:
Copy code
yaml
# In ./api/garden.yml
kind: Build
name: api
type: container
source:
 path: ../ # <--- Set the action source to the project root
include: [./api/**/*, ./dockerfiles/api.dockerfile] # <--- We need to specify includes since we told Garden the action source is at the root. The includes are relative to the source path we set.
spec:
 dockerfile: api.dockerfile # <--- If our Dockerfile isn't called 'Dockerfile' we need to specify the name here
(Source: Garden Documentation ()) If you're still experiencing issues, I would recommend reaching out to the Garden community for further assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
b
@big-spring-14945 / @chilly-gigabyte-83853 somehow garden is always changing the user when I run devMode, is this expected?
b
@bright-policeman-43626 No, that shouldn't happen. Can you share a reproducable example with this behaviour?
b
@big-spring-14945 it was our/my fault, we had a securityContextPolicy in the base-helmchart that was defaulting the users to run with UID 1000 (node), we had to nuke it for the local development pods so we can add files to the filesystem. Thanks!
b
Ah makes sense! Great job figuring that out 👍