-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathconstants.go
36 lines (29 loc) · 1.03 KB
/
constants.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package constants
import (
"errors"
"path/filepath"
)
const (
// WorkspacesDir is the path to the directory where
// all workspaces are stored by default.
WorkspacesDir = "/workspaces"
// EmptyWorkspaceDir is the path to a workspace that has
// nothing going on... it's empty!
EmptyWorkspaceDir = WorkspacesDir + "/empty"
// MagicDir is where all envbuilder related files are stored.
// This is a special directory that must not be modified
// by the user or images.
MagicDir = "/.envbuilder"
)
var (
ErrNoFallbackImage = errors.New("no fallback image has been specified")
// MagicFile 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 -> docker start
MagicFile = filepath.Join(MagicDir, "built")
// MagicImage is a file that is created in the image when
// envbuilder has already been run. This is used to skip
// building when a container is starting.
MagicImage = filepath.Join(MagicDir, "image")
)