{"modulePath":"github.com/coder/envbuilder","version":"v1.0.3","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package magicdir\n\n## Constants\n\n```go\nconst (\n\n\t// TempDir is a directory inside the build context inside which\n\t// we place files referenced by MagicDirectives.\n\tTempDir = \".envbuilder.tmp\"\n)\n```\n\n## Types\n\n```go\ntype MagicDir struct {\n\t// contains filtered or unexported fields\n}\n```\nMagicDir is a working directory for envbuilder. It will also be present in images built by envbuilder.\n\n```go\nvar (\n\t// Default is the default working directory for Envbuilder.\n\t// This defaults to /.envbuilder. It should only be used when Envbuilder\n\t// is known to be running as root inside a container.\n\tDefault MagicDir\n\t// Directives are directives automatically appended to Dockerfiles\n\t// when pushing the image. These directives allow the built image to be\n\t// 're-used'.\n\tDirectives = fmt.Sprintf(`\nCOPY --chmod=0755 %[1]s/envbuilder %[2]s/bin/envbuilder\nCOPY --chmod=0644 %[1]s/image %[2]s/image\nUSER root\nWORKDIR /\nENTRYPOINT [\"%[2]s/bin/envbuilder\"]\n`, TempDir, defaultMagicDirBase)\n)\n```\n\n```go\nfunc At(paths ...string) MagicDir\n```\nAt returns a MagicDir rooted at filepath.Join(paths...)\n\n```go\nfunc (m MagicDir) Built() string\n```\nBuilt is a file that is created in the workspace when envbuilder has already been run. This is used to skip building when a container is restarting. e.g. docker stop -\u003e docker start\n\n```go\nfunc (m MagicDir) Features() string\n```\nFeatures is a directory that contains feature files.\n\n```go\nfunc (m MagicDir) Image() string\n```\nImage is a file that is created in the image when envbuilder has already been run. This is used to skip the destructive initial build step when 'resuming' envbuilder from a previously built image.\n\n```go\nfunc (m MagicDir) Join(paths ...string) string\n```\nJoin returns the result of filepath.Join(\\[m.Path, paths...]).\n\n```go\nfunc (m MagicDir) Path() string\n```\nString returns the string representation of the MagicDir.\n\n","path":"github.com/coder/envbuilder/internal/magicdir","name":"magicdir","synopsis":"","isRedistributable":true}
