Skip to content

Create Devcontainer config#4793

Open
garrettw wants to merge 20 commits into
php:masterfrom
garrettw:master
Open

Create Devcontainer config#4793
garrettw wants to merge 20 commits into
php:masterfrom
garrettw:master

Conversation

@garrettw

@garrettw garrettw commented Jul 27, 2025

Copy link
Copy Markdown

As requested by @TimWolla.

@TimWolla TimWolla self-requested a review July 27, 2025 18:25
@garrettw

Copy link
Copy Markdown
Author

@TimWolla it's all ready for you now

@Girgias

Girgias commented Aug 1, 2025

Copy link
Copy Markdown
Member

I don't know anything about containerization and don't have any strong opinions about this.

@TimWolla

Copy link
Copy Markdown
Member

Thank you. I've tried spawning a codespace from your repository, connected to it via VS Code and ran make php. It failed with:

if [ -n "devcontainer" ] && [ "devcontainer" = "devcontainer" ]; then \
        .devcontainer/configure-apache.sh "/workspaces/php-doc-en/output/php-web"; \
fi
Apache web root directory set to /workspaces/php-doc-en/output/php-web
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
(13)Permission denied: AH00072: make_sock: could not bind to address [::]:80
(13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
make: *** [Makefile:29: php] Error 1

It appears the post-create.sh was not properly executed? Do you have any idea of what I did wrong?

Also, I think it would be nice to avoid the additional layer of Docker within a Codespace / dev container. Would it perhaps work to directly install Java + PHP in the Codespace at creation time?

@garrettw

Copy link
Copy Markdown
Author

I'm sure I can find a way to avoid the extra Docker layer. No idea on the other problem though - it's not happening on my end with a fresh Codespace.

@cweiske

cweiske commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Do I see correctly that devcontainer.json is specific to Visual Studio Code and no other IDEs?

Why is a devcontainer with a web server needed at all, when the Makefile already uses a container to build/render the manual?

@garrettw

garrettw commented Mar 10, 2026

Copy link
Copy Markdown
Author

@cweiske The Devcontainer spec is not specific to VS Code, though it was probably implemented there first as it's a Microsoft invention. PhpStorm supports it as well, but more importantly, GitHub Codespaces can use it to spawn a pre-customized browser-based dev environment based on VS Code.

Sorry I've let this languish; life priorities got in the way and it slipped my mind.

Comment thread .devcontainer/devcontainer.json Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants