-
When using In the onCreateCommand: apt-get update && apt-get install {dev.packages etc. gdb ...} However, the final "containerUser": "root",
"remoteUser": "appuser" Despite these settings, the commands in My Goal:I want to execute the Key Considerations:
Question:Does anyone have a good solution or best practice to achieve this? Ideally, I want the container to start as |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You could install the packages using a Dockerfile. That has the advantage of using Docker's layer cache. If you have to use |
Beta Was this translation helpful? Give feedback.
-
I understand the solution of modifying the Dockerfile, but I would prefer to base the development container on the deployment image's Dockerfile. My main concern is that I don't want to increase the size of the deployment image by adding development-specific dependencies. As you mentioned, creating a separate development Dockerfile and installing the necessary packages there is one solution, but I would prefer not to take that approach. If modifying the image is unavoidable, I think granting none-password sudo privileges as you suggested would be the best solution. Thank you! 🙇🏻♂️🙇🏻♂️ |
Beta Was this translation helpful? Give feedback.
You could install the packages using a Dockerfile. That has the advantage of using Docker's layer cache.
If you have to use
onCreateCommand
for some reason, you could usesudo
by configuring it to work without password (our images come with it preconfigured this way).