mirror of
https://github.com/containers/podman.git
synced 2025-11-13 09:38:05 +08:00
Introduce Windows WSL implementation of podman machine
[NO NEW TESTS NEEDED] for now Signed-off-by: Jason Greene <jason.greene@redhat.com>
This commit is contained in:
committed by
Jason T. Greene
parent
73a54ea54d
commit
803defbe50
2
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
2
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@@ -512,6 +512,8 @@ type MachineConfig struct {
|
||||
Image string `toml:"image,omitempty"`
|
||||
// Memory in MB a machine is created with.
|
||||
Memory uint64 `toml:"memory,omitempty,omitzero"`
|
||||
// Username to use for rootless podman when init-ing a podman machine VM
|
||||
User string `toml:"user,omitempty"`
|
||||
}
|
||||
|
||||
// Destination represents destination for remote service
|
||||
|
||||
5
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
5
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@@ -587,6 +587,11 @@ default_sysctls = [
|
||||
#
|
||||
#memory=2048
|
||||
|
||||
# The username to use and create on the podman machine OS for rootless
|
||||
# container access.
|
||||
#
|
||||
#user = "core"
|
||||
|
||||
# The [machine] table MUST be the last entry in this file.
|
||||
# (Unless another table is added)
|
||||
# TOML does not provide a way to end a table other than a further table being
|
||||
|
||||
3
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
3
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@@ -227,8 +227,9 @@ func defaultMachineConfig() MachineConfig {
|
||||
return MachineConfig{
|
||||
CPUs: 1,
|
||||
DiskSize: 100,
|
||||
Image: "testing",
|
||||
Image: getDefaultMachineImage(),
|
||||
Memory: 2048,
|
||||
User: getDefaultMachineUser(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
11
vendor/github.com/containers/common/pkg/config/default_linux.go
generated
vendored
11
vendor/github.com/containers/common/pkg/config/default_linux.go
generated
vendored
@@ -13,6 +13,17 @@ const (
|
||||
oldMaxSize = uint64(1048576)
|
||||
)
|
||||
|
||||
// getDefaultMachineImage returns the default machine image stream
|
||||
// On Linux/Mac, this returns the FCOS stream
|
||||
func getDefaultMachineImage() string {
|
||||
return "testing"
|
||||
}
|
||||
|
||||
// getDefaultMachineUser returns the user to use for rootless podman
|
||||
func getDefaultMachineUser() string {
|
||||
return "core"
|
||||
}
|
||||
|
||||
// getDefaultRootlessNetwork returns the default rootless network configuration.
|
||||
// It is "slirp4netns" for Linux.
|
||||
func getDefaultRootlessNetwork() string {
|
||||
|
||||
13
vendor/github.com/containers/common/pkg/config/default_unsupported.go
generated
vendored
13
vendor/github.com/containers/common/pkg/config/default_unsupported.go
generated
vendored
@@ -1,7 +1,18 @@
|
||||
// +build !linux
|
||||
// +build !linux,!windows
|
||||
|
||||
package config
|
||||
|
||||
// getDefaultMachineImage returns the default machine image stream
|
||||
// On Linux/Mac, this returns the FCOS stream
|
||||
func getDefaultMachineImage() string {
|
||||
return "testing"
|
||||
}
|
||||
|
||||
// getDefaultMachineUser returns the user to use for rootless podman
|
||||
func getDefaultMachineUser() string {
|
||||
return "core"
|
||||
}
|
||||
|
||||
// getDefaultRootlessNetwork returns the default rootless network configuration.
|
||||
// It is "cni" for non-Linux OSes (to better support `podman-machine` usecases).
|
||||
func getDefaultRootlessNetwork() string {
|
||||
|
||||
28
vendor/github.com/containers/common/pkg/config/default_windows.go
generated
vendored
Normal file
28
vendor/github.com/containers/common/pkg/config/default_windows.go
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package config
|
||||
|
||||
// getDefaultImage returns the default machine image stream
|
||||
// On Windows this refers to the Fedora major release number
|
||||
func getDefaultMachineImage() string {
|
||||
return "35"
|
||||
}
|
||||
|
||||
// getDefaultMachineUser returns the user to use for rootless podman
|
||||
func getDefaultMachineUser() string {
|
||||
return "user"
|
||||
}
|
||||
|
||||
// getDefaultRootlessNetwork returns the default rootless network configuration.
|
||||
// It is "cni" for non-Linux OSes (to better support `podman-machine` usecases).
|
||||
func getDefaultRootlessNetwork() string {
|
||||
return "cni"
|
||||
}
|
||||
|
||||
// isCgroup2UnifiedMode returns whether we are running in cgroup2 mode.
|
||||
func isCgroup2UnifiedMode() (isUnified bool, isUnifiedErr error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// getDefaultProcessLimits returns the nofile and nproc for the current process in ulimits format
|
||||
func getDefaultProcessLimits() []string {
|
||||
return []string{}
|
||||
}
|
||||
Reference in New Issue
Block a user