agent/containermetadata/write_metadata_unix.go
func createBindsEnv(binds []string, env []string, dataDirOnHost string, metadataDirectoryPath string) ([]string, []string) {
	randID := uuid.New()
	instanceBind := fmt.Sprintf(`%s/%s:%s/%s`, dataDirOnHost, metadataDirectoryPath, mountPoint, randID)
	metadataEnvVariable := fmt.Sprintf("%s=%s/%s/%s", metadataEnvironmentVariable, mountPoint, randID, metadataFile)
	binds = append(binds, instanceBind)
	env = append(env, metadataEnvVariable)
	return binds, env
}
func createBindsEnv(binds []string, env []string, dataDirOnHost string, metadataDirectoryPath string) ([]string, []string) {
	randID := uuid.New()
	instanceBind := fmt.Sprintf(`%s/%s:%s/%s`, dataDirOnHost, metadataDirectoryPath, mountPoint, randID)
	metadataEnvVariable := fmt.Sprintf("%s=%s/%s/%s", metadataEnvironmentVariable, mountPoint, randID, metadataFile)
	binds = append(binds, instanceBind)
	env = append(env, metadataEnvVariable)
	return binds, env
}
func createBindsEnv ( binds [ ] string , env [ ] string , dataDirOnHost string , metadataDirectoryPath string ) ( [ ] string , [ ] string ) { randID := uuid . New ( ) instanceBind := fmt . Sprintf ( `%s/%s:%s/%s` , dataDirOnHost , metadataDirectoryPath , mountPoint , randID ) metadataEnvVariable := fmt . Sprintf ( " " , metadataEnvironmentVariable , mountPoint , randID , metadataFile ) binds = append ( binds , instanceBind ) env = append ( env , metadataEnvVariable ) return binds , env }
// createBindsEnv will do the appropriate formatting to add a new mount in a container's HostConfig
// and add the metadata file path as an environment variable ECS_CONTAINER_METADATA_FILE
// We add an additional uuid to the path to ensure it does not conflict with user mounts
createBindsEnv will do the appropriate formatting to add a new mount in a container s HostConfig and add the metadata file path as an environment variable ECS_CONTAINER_METADATA_FILE We add an additional uuid to the path to ensure it does not conflict with user mounts