A ready-to-use dev container for Marko.build projects. Opens in VS Code Dev Containers or GitHub Codespaces and scaffolds a new Marko project automatically.
- PHP (latest) + Composer
- Node.js (LTS) + Tailwind CSS
- MySQL or PostgreSQL (via Docker Compose)
- Redis (via Docker Compose)
- Docker-in-Docker
- Port 8000 forwarded for the dev server
Github Codespaces:
-
Edit section below in .devcontainer/devcontainer.json and save changes
"containerEnv": { "MARKO_PROJECT_NAME": "palettes", "MARKO_INSTALL_MODE": "skeleton", "MARKO_PACKAGES": "marko/database marko/cache-redis marko/session marko/view marko/view-latte marko/security marko/testing marko/database-mysql" },
*note - If you plan to use a postgres DB replace "marko/database-mysql" with "marko/database-pgsql", plus change database container in compose.yml
-
Edit .devcontainer/compose.yml and/or package.json to add required docker images/containers. Add NODE packages to package.json/ additional scripts etc. Save changes.
-
Open Github hamburger menu Top Left -> select Codespaces
-
Click Green Button Top Right "New codespace"
-
Create a new codespace -> Select a repository: "username/codespaces-marko" -> Branch: main -> Region: Default (US East) -> Machine Type: Many options
-
Click Green Button "Create codespace"
-
New Window Open -> VS Code like editor -> Devcontainer will automatically start build process this will take a few minutes. -> terminal cmd: cd project-name -> terminal cmd: marko up
Deskop VS Code:
-
Clone this repository locally
-
Open the folder in VS Code
Edit section below in .devcontainer/devcontainer.json and save changes
Snippet area to change in devcontainer.json "containerEnv": { "MARKO_PROJECT_NAME": "palettes", "MARKO_INSTALL_MODE": "skeleton", "MARKO_PACKAGES": "marko/database marko/cache-redis marko/session marko/view marko/view-latte marko/security marko/testing marko/database-mysql" },
Edit .devcontainer/compose.yml and/or package.json to add required docker images/containers. Add NODE packages to package.json/ additional scripts etc. Save changes.
*note - If you plan to use a postgres DB replace "marko/database-mysql" with "marko/database-pgsql", plus change database container in compose.yml
-
Click Show Commands
-
Click Dev Containers: Rebuild and Reopen in Container
-
VS Code will start devcontainer build, this will take a few minutes
-
-> terminal cmd: cd project-name -> terminal cmd: marko up
- Note running from Desktop VS Code requires Marko "host" configuration to be changed to "0.0.0.0". You will need to first run -> marko down -> add host 0.0.0.0 to marko project config -> then run marko up.
All project settings live in .devcontainer/devcontainer.json under containerEnv:
| Variable | Default | Description |
|---|---|---|
MARKO_PROJECT_NAME |
project-name |
Folder name for the scaffolded project |
MARKO_INSTALL_MODE |
skeleton |
skeleton or framework |
MARKO_PACKAGES |
see file | Space-separated Composer packages to install |
Change MARKO_PROJECT_NAME and rebuild — the project folder and shell PATH update automatically.
The marko CLI is available globally after the build:
marko # list available commandsA compose.yml is automatically copied into your project on first build. It defines the available backing services:
| Service | Image | Default port |
|---|---|---|
mysql |
mysql:8.4 |
3306 |
postgres |
postgres:16-alpine |
5432 |
redis |
redis:7.2-alpine |
6379 |
MySQL and Redis are enabled by default. PostgreSQL is commented out. To switch databases, open compose.yml in your project, comment out the mysql block, and uncomment postgres (and the postgres-data volume).
marko up will start whichever services are active.
Default database credentials:
| Field | Value |
|---|---|
| Host | localhost |
| Database | project name (e.g. palettes) |
| User | marko |
| Password | marko |
| Root password | root |
A package.json is automatically copied into your project on first build with Tailwind CSS v4 included as a dev dependency. npm install runs automatically during setup.
To add further packages:
npm install <package>To reset and re-scaffold from scratch, rebuild the container:
- VS Code: Dev Containers: Rebuild Container
- Codespaces: Codespaces: Rebuild Container


