|
@@ -45,7 +45,6 @@ func getAccountIdentity(ctx context.Context, builder *Builder, accountName strin
|
|
|
// Check if the account name is one unique to containers.
|
|
|
if strings.EqualFold(accountName, "ContainerAdministrator") {
|
|
|
return idtools.Identity{SID: idtools.ContainerAdministratorSidString}, nil
|
|
|
-
|
|
|
} else if strings.EqualFold(accountName, "ContainerUser") {
|
|
|
return idtools.Identity{SID: idtools.ContainerUserSidString}, nil
|
|
|
}
|
|
@@ -56,7 +55,6 @@ func getAccountIdentity(ctx context.Context, builder *Builder, accountName strin
|
|
|
}
|
|
|
|
|
|
func lookupNTAccount(ctx context.Context, builder *Builder, accountName string, state *dispatchState) (idtools.Identity, error) {
|
|
|
-
|
|
|
source, _ := filepath.Split(os.Args[0])
|
|
|
|
|
|
target := "C:\\Docker"
|
|
@@ -72,14 +70,15 @@ func lookupNTAccount(ctx context.Context, builder *Builder, accountName string,
|
|
|
|
|
|
runConfig.Cmd = []string{targetExecutable, "getaccountsid", accountName}
|
|
|
|
|
|
- hostConfig := &container.HostConfig{Mounts: []mount.Mount{
|
|
|
- {
|
|
|
- Type: mount.TypeBind,
|
|
|
- Source: source,
|
|
|
- Target: target,
|
|
|
- ReadOnly: true,
|
|
|
+ hostConfig := &container.HostConfig{
|
|
|
+ Mounts: []mount.Mount{
|
|
|
+ {
|
|
|
+ Type: mount.TypeBind,
|
|
|
+ Source: source,
|
|
|
+ Target: target,
|
|
|
+ ReadOnly: true,
|
|
|
+ },
|
|
|
},
|
|
|
- },
|
|
|
}
|
|
|
|
|
|
container, err := builder.containerManager.Create(ctx, runConfig, hostConfig)
|