|
1 | 1 | { |
2 | 2 | "name": "APIM Samples", |
3 | 3 | "build": { |
4 | | - "dockerfile": "Dockerfile", |
| 4 | + "dockerfile": "Dockerfile.minimal", |
5 | 5 | "context": ".." |
6 | 6 | }, |
7 | 7 | "features": { |
8 | | - "ghcr.io/devcontainers/features/azure-cli:1": { |
9 | | - "version": "2.72.0" |
10 | | - }, |
11 | | - "ghcr.io/devcontainers/features/common-utils:2": { |
12 | | - "installZsh": true, |
13 | | - "configureZshAsDefaultShell": true, |
14 | | - "installOhMyZsh": true, |
15 | | - "upgradePackages": true, |
16 | | - "username": "vscode", |
17 | | - "uid": "1000", |
18 | | - "gid": "1000" |
19 | | - }, |
20 | | - "ghcr.io/devcontainers/features/git:1": { |
21 | | - "version": "latest", |
22 | | - "ppa": true |
23 | | - } |
| 8 | + // Temporarily disabled all features to troubleshoot sleep command issue |
| 9 | + // "ghcr.io/devcontainers/features/azure-cli:1": { |
| 10 | + // "version": "2.72.0" |
| 11 | + // }, |
| 12 | + // "ghcr.io/devcontainers/features/common-utils:2": { |
| 13 | + // "installZsh": true, |
| 14 | + // "configureZshAsDefaultShell": true, |
| 15 | + // "installOhMyZsh": true, |
| 16 | + // "upgradePackages": true, |
| 17 | + // "username": "vscode", |
| 18 | + // "uid": "1000", |
| 19 | + // "gid": "1000" |
| 20 | + // }, |
| 21 | + // "ghcr.io/devcontainers/features/git:1": { |
| 22 | + // "version": "latest", |
| 23 | + // "ppa": true |
| 24 | + // } |
24 | 25 | // Temporarily disabled docker-in-docker to troubleshoot container startup issues |
25 | 26 | // "ghcr.io/devcontainers/features/docker-in-docker:2": { |
26 | 27 | // "version": "latest", |
|
114 | 115 | "PYTHONPATH": "/workspaces/Apim-Samples/shared/python:/workspaces/Apim-Samples", |
115 | 116 | "PATH": "/workspaces/Apim-Samples/.venv/bin:/home/vscode/.local/bin:${PATH}" |
116 | 117 | }, |
117 | | - // Container lifecycle commands for optimal Codespaces prebuild performance: https://containers.dev/implementors/features/#lifecycle-hooks |
118 | | - // 1. onCreateCommand: Runs only once during initial prebuild - creates venv |
119 | | - // 2. updateContentCommand: Runs during any prebuild when content changes - installs/updates packages |
120 | | - // 3. postStartCommand: Runs on every startup - verifies and configures |
121 | | - "onCreateCommand": [ |
122 | | - "bash", "-c", |
123 | | - "echo '🚀 Creating Python virtual environment in workspace...' && /usr/local/bin/python3.12 -m venv /workspaces/Apim-Samples/.venv --copies && source /workspaces/Apim-Samples/.venv/bin/activate && pip install --upgrade pip setuptools wheel && echo '✅ Virtual environment created'" |
124 | | - ], |
125 | | - "updateContentCommand": [ |
126 | | - "bash", "-c", |
127 | | - "echo '📦 Installing/updating Python packages from requirements.txt...' && source /workspaces/Apim-Samples/.venv/bin/activate && pip install -r requirements.txt && pip install pytest pytest-cov coverage ipykernel && echo '✅ Python packages installed/updated' && python setup/setup_python_path.py --generate-env && echo '✅ Environment configuration updated' && echo '🔧 Registering Jupyter kernel...' && python -m ipykernel install --user --name=apim-samples --display-name='APIM Samples Python 3.12' --python=$(which python) && jupyter kernelspec list | grep apim-samples && echo '✅ Jupyter kernel registered successfully' && echo '⚙️ Configuring Azure CLI...' && az config set core.login_experience_v2=off 2>/dev/null || true && az extension add --name containerapp --only-show-errors 2>/dev/null || true && az extension add --name front-door --only-show-errors 2>/dev/null || true && echo '✅ Azure CLI configured for Codespaces'" |
128 | | - ], |
129 | | - "postStartCommand": [ |
130 | | - "bash", "-c", |
131 | | - "echo 'APIM Samples Codespace Starting - Keep this terminal open to see progress!' && bash .devcontainer/post-start-setup.sh" |
132 | | - ], |
| 118 | + // Simplified lifecycle commands - no sleep dependencies |
| 119 | + "onCreateCommand": "echo 'Container created successfully'", |
| 120 | + "postStartCommand": "echo 'Container started - running basic setup...' && bash .devcontainer/post-start-setup.sh", |
133 | 121 | "forwardPorts": [ |
134 | 122 | 8000, |
135 | 123 | 8080, |
|
0 commit comments