mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-01 00:42:13 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			73 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
			
		
		
	
	
			73 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
| {
 | |
|     // Reference Doc: https://code.visualstudio.com/remote/advancedcontainers/overview
 | |
|     "name": "OpenIM Dev Environment",
 | |
|     // Update the container version when you publish dev-container
 | |
|     "build": { "dockerfile": "Dockerfile" },
 | |
|     // Replace with uncommented line below to build your own local copy of the image
 | |
|     // "dockerFile": "../docker/Dockerfile-dev",
 | |
|     "remoteEnv": {
 | |
|         "GO111MODULE": "on",
 | |
|         "GOPROXY": "https://goproxy.cn",
 | |
|         "GOSUMDB": "sum.golang.org",
 | |
|         "GONOPROXY": "github.com/openimsdk",
 | |
|         "GONOSUMDB": "github.com/openimsdk",
 | |
|         "GOPRIVATE": "github.com/openimsdk"
 | |
|     },
 | |
|     "customizations": {
 | |
|         "vscode": {
 | |
|             "extensions": [
 | |
|                 "davidanson.vscode-markdownlint",
 | |
|                 "golang.go",
 | |
|                 "ms-azuretools.vscode-dapr",
 | |
|                 "ms-azuretools.vscode-docker",
 | |
|                 "ms-kubernetes-tools.vscode-kubernetes-tools"
 | |
|             ],
 | |
|             "settings": {
 | |
|                 "go.toolsManagement.checkForUpdates": "local",
 | |
|                 "go.useLanguageServer": true,
 | |
|                 "go.gopath": "/go"
 | |
|             }
 | |
|         }
 | |
|     },
 | |
|     "mounts": [
 | |
|         // Mount docker-in-docker library volume
 | |
|         "type=volume,source=dind-var-lib-docker,target=/var/lib/docker",
 | |
| 
 | |
|         // Bind mount docker socket under an alias to support docker-from-docker
 | |
|         "type=bind,source=/var/run/docker.sock,target=/var/run/docker-host.sock",
 | |
| 
 | |
|         // Bind mount docker socket under an alias to support docker-from-docker
 | |
|         // "type=bind,source=${env:HOME}${env:USERPROFILE}/.minikube/cache,target=/home/openim/.minikube/cache",
 | |
| 
 | |
|         // Uncomment to clone local .kube/config into devcontainer
 | |
|         "type=bind,source=${env:HOME}${env:USERPROFILE}/.kube,target=/home/openim/.kube-localhost"
 | |
| 
 | |
|         // Uncomment to additionally clone minikube certs into devcontainer for use with .kube/config
 | |
|         // "type=bind,source=${env:HOME}${env:USERPROFILE}/.minikube,target=/home/openim/.minikube-localhost"
 | |
|     ],
 | |
|     // Always run image-defined default command
 | |
|     "overrideCommand": false,
 | |
|     // On Linux, this will prevent new files getting created as root, but you
 | |
|     // may need to update the USER_UID and USER_GID in docker/Dockerfile-dev
 | |
|     // to match your user if not 1000.
 | |
|     // "remoteUser": "openimsdk",
 | |
|     "runArgs": [
 | |
|         // Enable ptrace-based debugging for go
 | |
|         "--cap-add=SYS_PTRACE",
 | |
|         "--security-opt",
 | |
|         "seccomp=unconfined",
 | |
| 
 | |
|         // Uncomment to bind to host network for local devcontainer; this is necessary if using the
 | |
|         // bind-mounted /var/run/docker-host.sock directly.
 | |
|         "--net=host",
 | |
| 
 | |
|         // Enable docker-in-docker configuration. Comment out if not using for better security.
 | |
|         "--privileged",
 | |
| 
 | |
|         // Run the entrypoint defined in container image.
 | |
|         "--init"
 | |
|     ],
 | |
|     "workspaceFolder": "/workspaces/openim",
 | |
|     "workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/workspaces/openim"
 | |
| }
 |