Using in GitHub Codespaces
If your repository already has the devcontainer configured, you can open it in GitHub Codespaces with zero local setup.
Prerequisites
- A GitHub account with access to Codespaces
- A repository with the devcontainer already configured
Steps
Navigate to your repository on GitHub
Click Code → Codespaces → Create codespace on main
Wait for the environment to build
On create, the devcontainer runs
composer installautomatically when the project's dependencies resolve from auth-free repositories (e.g.mirror.mage-os.org), and then runssetup:installautomatically once the dependencies are in place. You get a ready-to-use store with no manual steps.If the project depends on license-gated repositories such as
repo.magento.comor Hyvä,composer installis skipped unless credentials are available (andsetup:installis skipped with it). Add aCOMPOSER_AUTHCodespaces secret (or commit anauth.json) and rebuild, or run the manual steps in step 4.(Only if the automatic install was skipped) Install dependencies and run setup:
composer install
.devcontainer/magento2-devcontainer/bin/setup-install.sh | bash- Verify the installation:
bin/magento --versionNext Steps
- Docker Compose Configuration - Customize your environment