devcontainer.json 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {
  2. "image": "ghcr.io/imgproxy/imgproxy-base:v4-dev",
  3. "name": "imgproxy OSS",
  4. "forwardPorts": [
  5. 8081
  6. ],
  7. "containerEnv": {
  8. "IMGPROXY_PORT": "8081",
  9. "IMGPROXY_LOCAL_FILESYSTEM_ROOT": "/images",
  10. "IMGPROXY_ENABLE_VIDEO_THUMBNAILS": "true",
  11. "IMGPROXY_MAX_ANIMATION_FRAMES": "999",
  12. "IMGPROXY_VIPS_LEAK_CHECK": "true",
  13. "IMGPROXY_LOG_MEM_STATS": "true",
  14. "IMGPROXY_DEVELOPMENT_ERRORS_MODE": "true"
  15. },
  16. "mounts": [
  17. {
  18. "source": "${localWorkspaceFolder}/.devcontainer/images",
  19. "target": "/images",
  20. "type": "bind"
  21. },
  22. {
  23. "source": "${localWorkspaceFolder}/.tmp/_dev-root/.cache",
  24. "target": "/root/.cache",
  25. "type": "bind"
  26. },
  27. {
  28. "source": "${localWorkspaceFolder}/.tmp/_dev-root/go/pkg/mod",
  29. "target": "/root/go/pkg/mod",
  30. "type": "bind"
  31. },
  32. {
  33. "source": "${localWorkspaceFolder}/.tmp/_dev-root/.bash_history",
  34. "target": "/root/.bash_history",
  35. "type": "bind"
  36. }
  37. ],
  38. "customizations": {
  39. "vscode": {
  40. "extensions": [
  41. "golang.go",
  42. "ms-vscode.cpptools"
  43. ]
  44. }
  45. },
  46. "postCreateCommand": "lefthook install",
  47. "initializeCommand": {
  48. "createCacheDirs": "mkdir -p ${localWorkspaceFolder}/.tmp/_dev-root/.cache ${localWorkspaceFolder}/.tmp/_dev-root/go/pkg/mod",
  49. "createBashHistory": "touch ${localWorkspaceFolder}/.tmp/_dev-root/.bash_history",
  50. "linkImagesDir": "if [ ! -e ${localWorkspaceFolder}/.devcontainer/images ]; then ln -s ${localWorkspaceFolder}/testdata/test-images ${localWorkspaceFolder}/.devcontainer/images; fi"
  51. }
  52. }