devcontainers / templates

Repository for Dev Container Templates that are managed by Dev Container spec maintainers. See https://github.com/devcontainers/template-starter to create your own!
https://containers.dev/templates
MIT License
924 stars 242 forks source link

No shell script in postCreateCommand possible ?! #144

Closed araeubig closed 1 year ago

araeubig commented 1 year ago

Perhaps it depends on my Newby-state but i tried to start completely on a basic template with the normal php or php+mariadb container.

In postCreateCommand i defined a shell script and always on doing it online with github container i got a permission error (126) - on the local machine it works.

I googled a lot and found some alternative approaches but it does not solve my problem. How it would be possible to start a script with the original containers?

PS I could not understand why the marketing for VS Code with GitHub Codespaces is very "big" but the help files target only hardcore linux users. To make a team development in the cloud is a very good possibility for us but actually "i see no end" and i need really help to create a very basic container to run online and offline. The working samples here on github are between s start or very complete oversized. Therefore i try to do it myself but i have to stop because on the written basic error.

Thanks for a feedback.

samruddhikhandale commented 1 year ago

Hi @araeubig 👋

Apologies that you are facing this issue. I am able to run a bash script without any issues with the following command 👇

"postCreateCommand": "bash .devcontainer/setup.sh"

Does that work for you? If not, then can you paste your dev config or point me to a reproducible example, thanks!

Also, have you looked at the https://containers.dev/implementors/json_reference/#lifecycle-scripts docs, it provides more details and examples.

samruddhikhandale commented 1 year ago

Closing as stale. Feel free to reopen with more details.