I am using a separate nodejs container as in How to use a separate node container in your ddev setup?, but I'd really like to add the gatsby-cli npm package to it, and maybe add sudo as well. I know how to add a custom Dockerfile to the web service and do these things but how can I do it with a custom service?
How can I add gatsby-cli or sudo or other packages to a DDEV-Local add-on service like nodejs?
207 Views Asked by rfay At
1
There are 1 best solutions below
Related Questions in DDEV
- Modifying local DDEV Drupal settings.php for live server?
- unable to enable php-gmp for php7.4 with ddev
- Accessing webpack dev server output with specific port in ddev / docker container
- Private files in a DDEV Drupal environment
- How can I add gatsby-cli or sudo or other packages to a DDEV-Local add-on service like nodejs?
- Moving Drupal DDev containers / projects to a new computer
- DDEV to XAMPP connection configuration
- DDEV: Can't Access Site Via Hostname, hosts File Not Updated
- Projects not starting after DDEV update?
- Include css file with changing hash number via includeCss
- Vite main.js file not found error in console
- ddev snapshot fails with bash "Is a directory" error
- ddev and vscode for Drupal, what should I use for php.validate.executablePath?
- How to debug Behat test with Xdebug in PhpStorm?
- CORS still blocked between two DDEV sites
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can do the same things ddev does to add a custom Dockerfile, and add a
buildstanza and a.ddev/<servicename>-builddirectory with the needed files.So for a .ddev/docker-compose.node.yaml file:
And then
mkdir .ddev/node-buildand create .ddev/node-build/Dockerfile withand .ddev/node-build/sudoers.d/ddev with
The result in this case is you get gatsby-cli installed via npm, and also get bash and passwordless sudo installed. This is just an example, there is plenty more that can be done, of course.
This saves the trouble of creating and maintaining a custom Docker image and pushing it up to hub.docker.com.