remove various LCOW bits (container, image, pkg/containerfs)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
0998c7e363
commit
13cb04e57c
4 changed files with 7 additions and 19 deletions
|
@ -264,12 +264,6 @@ func (container *Container) WriteHostConfig() (*containertypes.HostConfig, error
|
|||
|
||||
// SetupWorkingDirectory sets up the container's working directory as set in container.Config.WorkingDir
|
||||
func (container *Container) SetupWorkingDirectory(rootIdentity idtools.Identity) error {
|
||||
// TODO: LCOW Support. This will need revisiting.
|
||||
// We will need to do remote filesystem operations here.
|
||||
if container.OS != runtime.GOOS {
|
||||
return nil
|
||||
}
|
||||
|
||||
if container.Config.WorkingDir == "" {
|
||||
return nil
|
||||
}
|
||||
|
@ -727,14 +721,14 @@ func getConfigTargetPath(r *swarmtypes.ConfigReference) string {
|
|||
// CreateDaemonEnvironment creates a new environment variable slice for this container.
|
||||
func (container *Container) CreateDaemonEnvironment(tty bool, linkedEnv []string) []string {
|
||||
// Setup environment
|
||||
os := container.OS
|
||||
if os == "" {
|
||||
os = runtime.GOOS
|
||||
ctrOS := container.OS
|
||||
if ctrOS == "" {
|
||||
ctrOS = runtime.GOOS
|
||||
}
|
||||
|
||||
// Figure out what size slice we need so we can allocate this all at once.
|
||||
envSize := len(container.Config.Env)
|
||||
if runtime.GOOS != "windows" || (runtime.GOOS == "windows" && os == "linux") {
|
||||
if runtime.GOOS != "windows" {
|
||||
envSize += 2 + len(linkedEnv)
|
||||
}
|
||||
if tty {
|
||||
|
@ -743,7 +737,7 @@ func (container *Container) CreateDaemonEnvironment(tty bool, linkedEnv []string
|
|||
|
||||
env := make([]string, 0, envSize)
|
||||
if runtime.GOOS != "windows" {
|
||||
env = append(env, "PATH="+system.DefaultPathEnv(os))
|
||||
env = append(env, "PATH="+system.DefaultPathEnv(ctrOS))
|
||||
env = append(env, "HOSTNAME="+container.Config.Hostname)
|
||||
if tty {
|
||||
env = append(env, "TERM=xterm")
|
||||
|
|
|
@ -217,9 +217,7 @@ func (s *saveSession) save(outStream io.Writer) error {
|
|||
|
||||
for _, l := range imageDescr.layers {
|
||||
// IMPORTANT: We use path, not filepath here to ensure the layers
|
||||
// in the manifest use Unix-style forward-slashes. Otherwise, a
|
||||
// Linux image saved from LCOW won't be able to be imported on
|
||||
// LCOL.
|
||||
// in the manifest use Unix-style forward-slashes.
|
||||
layers = append(layers, path.Join(l, legacyLayerFileName))
|
||||
}
|
||||
|
||||
|
|
|
@ -374,9 +374,6 @@ func RebaseArchiveEntries(srcContent io.Reader, oldBase, newBase string) io.Read
|
|||
return rebased
|
||||
}
|
||||
|
||||
// TODO @gupta-ak. These might have to be changed in the future to be
|
||||
// continuity driver aware as well to support LCOW.
|
||||
|
||||
// CopyResource performs an archive copy from the given source path to the
|
||||
// given destination path. The source path MUST exist and the destination
|
||||
// path's parent directory must exist.
|
||||
|
|
|
@ -28,8 +28,7 @@ type ContainerFS interface {
|
|||
// Driver combines both continuity's Driver and PathDriver interfaces with a Platform
|
||||
// field to determine the OS.
|
||||
type Driver interface {
|
||||
// OS returns the OS where the rootfs is located. Essentially,
|
||||
// runtime.GOOS for everything aside from LCOW, which is "linux"
|
||||
// OS returns the OS where the rootfs is located. Essentially, runtime.GOOS.
|
||||
OS() string
|
||||
|
||||
// Architecture returns the hardware architecture where the
|
||||
|
|
Loading…
Reference in a new issue