Add support for devcontainers. (#6)
This commit is contained in:
		
							parent
							
								
									c8dcd9291b
								
							
						
					
					
						commit
						67fac7803e
					
				
					 3 changed files with 66 additions and 0 deletions
				
			
		
							
								
								
									
										33
									
								
								.devcontainer/devcontainer.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								.devcontainer/devcontainer.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,33 @@
 | 
				
			||||||
 | 
					// For format details, see https://aka.ms/devcontainer.json. For config options, see the
 | 
				
			||||||
 | 
					// README at: https://github.com/devcontainers/templates/tree/main/src/debian
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    "name": "QMK CLI",
 | 
				
			||||||
 | 
					    // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
 | 
				
			||||||
 | 
					    "image": "ghcr.io/qmk/qmk_cli",
 | 
				
			||||||
 | 
					    "customizations": {
 | 
				
			||||||
 | 
					        "vscode": {
 | 
				
			||||||
 | 
					            "extensions": [
 | 
				
			||||||
 | 
					                "amodio.toggle-excluded-files",
 | 
				
			||||||
 | 
					                "EditorConfig.EditorConfig",
 | 
				
			||||||
 | 
					                "xaver.clang-format",
 | 
				
			||||||
 | 
					                "llvm-vs-code-extensions.vscode-clangd",
 | 
				
			||||||
 | 
					                "bierner.github-markdown-preview",
 | 
				
			||||||
 | 
					                "donjayamanne.git-extension-pack",
 | 
				
			||||||
 | 
					                "ms-vscode-remote.remote-containers"
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "postCreateCommand": "/workspaces/qmk_userspace/.devcontainer/setup.sh"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Features to add to the dev container. More info: https://containers.dev/features.
 | 
				
			||||||
 | 
					    // "features": {},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Use 'forwardPorts' to make a list of ports inside the container available locally.
 | 
				
			||||||
 | 
					    // "forwardPorts": [],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Configure tool-specific properties.
 | 
				
			||||||
 | 
					    // "customizations": {},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
 | 
				
			||||||
 | 
					    // "remoteUser": "root"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										21
									
								
								.devcontainer/setup.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										21
									
								
								.devcontainer/setup.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,21 @@
 | 
				
			||||||
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set -eEuo pipefail
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wget https://bootstrap.pypa.io/get-pip.py
 | 
				
			||||||
 | 
					python3 get-pip.py
 | 
				
			||||||
 | 
					python3 -m pip install qmk
 | 
				
			||||||
 | 
					rm get-pip.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					python3 -m pip install --upgrade milc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					git config --global --add safe.directory /workspaces/qmk_userspace
 | 
				
			||||||
 | 
					git submodule update --init --recursive
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[ -d /workspaces/qmk_firmware ] || git clone https://github.com/qmk/qmk_firmware.git /workspaces/qmk_firmware
 | 
				
			||||||
 | 
					git config --global --add safe.directory /workspaces/qmk_firmware
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					qmk config user.qmk_home=/workspaces/qmk_firmware
 | 
				
			||||||
 | 
					qmk config user.overlay_dir=/workspaces/qmk_userspace
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					qmk git-submodule
 | 
				
			||||||
							
								
								
									
										12
									
								
								.vscode/extensions.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								.vscode/extensions.json
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,12 @@
 | 
				
			||||||
 | 
					// Suggested extensions
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    "recommendations": [
 | 
				
			||||||
 | 
					        "amodio.toggle-excluded-files",
 | 
				
			||||||
 | 
					        "EditorConfig.EditorConfig",
 | 
				
			||||||
 | 
					        "xaver.clang-format",
 | 
				
			||||||
 | 
					        "llvm-vs-code-extensions.vscode-clangd",
 | 
				
			||||||
 | 
					        "bierner.github-markdown-preview",
 | 
				
			||||||
 | 
					        "donjayamanne.git-extension-pack",
 | 
				
			||||||
 | 
					        "ms-vscode-remote.remote-containers"
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue