{"modulePath":"github.com/coder/envbuilder","version":"v1.3.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package workingdir\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 WorkingDir struct {\n\t// contains filtered or unexported fields\n}\n```\nWorkingDir 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 WorkingDir\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, defaultWorkingDirBase)\n)\n```\n\n```go\nfunc At(paths ...string) WorkingDir\n```\nAt returns a WorkingDir rooted at filepath.Join(paths...)\n\n```go\nfunc (m WorkingDir) 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 WorkingDir) Features() string\n```\nFeatures is a directory that contains feature files.\n\n```go\nfunc (m WorkingDir) 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 WorkingDir) Join(paths ...string) string\n```\nJoin returns the result of filepath.Join(\\[m.Path, paths...]).\n\n```go\nfunc (m WorkingDir) Path() string\n```\nString returns the string representation of the WorkingDir.\n\n","path":"github.com/coder/envbuilder/internal/workingdir","name":"workingdir","synopsis":"","isRedistributable":true}
