-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add experimental support for macOS native containers
Signed-off-by: Marat Radchenko <[email protected]>
- Loading branch information
1 parent
3197395
commit bd225ea
Showing
355 changed files
with
51,333 additions
and
4,776 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package oci | ||
|
||
import ( | ||
"github.com/containerd/containerd/oci" | ||
"github.com/docker/docker/pkg/idtools" | ||
"github.com/moby/buildkit/solver/pb" | ||
specs "github.com/opencontainers/runtime-spec/specs-go" | ||
"github.com/pkg/errors" | ||
) | ||
|
||
func generateMountOpts(resolvConf, hostsFile string) ([]oci.SpecOpts, error) { | ||
return nil, nil | ||
} | ||
|
||
// generateSecurityOpts may affect mounts, so must be called after generateMountOpts | ||
func generateSecurityOpts(mode pb.SecurityMode, apparmorProfile string, selinuxB bool) ([]oci.SpecOpts, error) { | ||
if mode == pb.SecurityMode_INSECURE { | ||
return nil, errors.New("no support for running in insecure mode on Darwin") | ||
} | ||
return nil, nil | ||
} | ||
|
||
// generateProcessModeOpts may affect mounts, so must be called after generateMountOpts | ||
func generateProcessModeOpts(mode ProcessMode) ([]oci.SpecOpts, error) { | ||
if mode == NoProcessSandbox { | ||
return nil, errors.New("no support for NoProcessSandbox on Darwin") | ||
} | ||
return nil, nil | ||
} | ||
|
||
func generateIDmapOpts(idmap *idtools.IdentityMapping) ([]oci.SpecOpts, error) { | ||
if idmap == nil { | ||
return nil, nil | ||
} | ||
return nil, errors.New("no support for IdentityMapping on Darwin") | ||
} | ||
|
||
func generateRlimitOpts(ulimits []*pb.Ulimit) ([]oci.SpecOpts, error) { | ||
if len(ulimits) == 0 { | ||
return nil, nil | ||
} | ||
return nil, errors.New("no support for POSIXRlimit on Darwin") | ||
} | ||
|
||
// tracing is not implemented on Darwin | ||
func getTracingSocketMount(socket string) *specs.Mount { | ||
return nil | ||
} | ||
|
||
// tracing is not implemented on Darwin | ||
func getTracingSocket() string { | ||
return "" | ||
} | ||
|
||
func cgroupNamespaceSupported() bool { | ||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.