summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/kpod/create.go2
-rw-r--r--cmd/kpod/parse.go30
-rw-r--r--docs/kpod-create.1.md26
-rw-r--r--docs/kpod-run.1.md45
4 files changed, 6 insertions, 97 deletions
diff --git a/cmd/kpod/create.go b/cmd/kpod/create.go
index 1b340f96d..fc6e519fa 100644
--- a/cmd/kpod/create.go
+++ b/cmd/kpod/create.go
@@ -115,7 +115,6 @@ type createConfig struct {
group uint32 // group
utsMode container.UTSMode //uts
volumes []string //volume
- volumesFrom []string //volumes-from
workDir string //workdir
mountLabel string //SecurityOpts
processLabel string //SecurityOpts
@@ -478,7 +477,6 @@ func parseCreateOpts(c *cli.Context, runtime *libpod.Runtime) (*createConfig, er
user: uid,
group: gid,
volumes: c.StringSlice("volume"),
- volumesFrom: c.StringSlice("volumes-from"),
workDir: c.String("workdir"),
}
diff --git a/cmd/kpod/parse.go b/cmd/kpod/parse.go
index 7f6fc78df..53d49c36c 100644
--- a/cmd/kpod/parse.go
+++ b/cmd/kpod/parse.go
@@ -449,36 +449,6 @@ func validateMACAddress(val string) (string, error) { //nolint
return val, nil
}
-// validateLink validates that the specified string has a valid link format (containerName:alias).
-func validateLink(val string) (string, error) { //nolint
- if _, _, err := parseLink(val); err != nil {
- return val, err
- }
- return val, nil
-}
-
-// parseLink parses and validates the specified string as a link format (name:alias)
-func parseLink(val string) (string, string, error) {
- if val == "" {
- return "", "", fmt.Errorf("empty string specified for links")
- }
- arr := strings.Split(val, ":")
- if len(arr) > 2 {
- return "", "", fmt.Errorf("bad format for links: %s", val)
- }
- if len(arr) == 1 {
- return val, val, nil
- }
- // This is kept because we can actually get a HostConfig with links
- // from an already created container and the format is not `foo:bar`
- // but `/foo:/c1/bar`
- if strings.HasPrefix(arr[0], "/") {
- _, alias := path.Split(arr[1])
- return arr[0][1:], alias, nil
- }
- return arr[0], arr[1], nil
-}
-
// parseLoggingOpts validates the logDriver and logDriverOpts
// for log-opt and log-driver flags
func parseLoggingOpts(logDriver string, logDriverOpt []string) (map[string]string, error) { //nolint
diff --git a/docs/kpod-create.1.md b/docs/kpod-create.1.md
index 190b4491f..f6a0e6722 100644
--- a/docs/kpod-create.1.md
+++ b/docs/kpod-create.1.md
@@ -307,9 +307,8 @@ unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap.
kpod generates a UUID for each container, and if a name is not assigned
to the container with **--name** then the daemon will also generate a random
-string name. The name is useful when defining links (see **--link**) (or any
-other place you need to identify a container). This works for both background
-and foreground containers.
+string name. The name is useful any place you need to identify a container.
+This works for both background and foreground containers.
**--network**="*bridge*"
Set the Network mode for the container
@@ -498,8 +497,7 @@ must be an absolute path as well. kpod bind-mounts the `HOST-DIR` to the
path you specify. For example, if you supply the `/foo` value, kpod creates a bind-mount.
You can specify multiple **-v** options to mount one or more mounts to a
-container. To use these same mounts in other containers, specify the
-**--volumes-from** option also.
+container.
You can add `:ro` or `:rw` suffix to a volume to mount it read-only or
read-write mode, respectively. By default, the volumes are mounted read-write.
@@ -552,24 +550,6 @@ change propagation properties of source mount. Say `/` is source mount for
To disable automatic copying of data from the container path to the volume, use
the `nocopy` flag. The `nocopy` flag can be set on bind mounts and named volumes.
-**--volumes-from**=[]
- Mount volumes from the specified container(s)
-
- Mounts already mounted volumes from a source container onto another
- container. You must supply the source's container-id. To share
- a volume, use the **--volumes-from** option when running
- the target container. You can share volumes even if the source container
- is not running.
-
- By default, kpod mounts the volumes in the same mode (read-write or
- read-only) as it is mounted in the source container. Optionally, you
- can change this by suffixing the container-id with either the `:ro` or
- `:rw ` keyword.
-
- If the location of the volume from the source container overlaps with
- data residing on a target container, then the volume hides
- that data on the target.
-
**-w**, **--workdir**=""
Working directory inside the container
diff --git a/docs/kpod-run.1.md b/docs/kpod-run.1.md
index 269be25ab..478afe408 100644
--- a/docs/kpod-run.1.md
+++ b/docs/kpod-run.1.md
@@ -313,9 +313,8 @@ unit, `b` is used. Set LIMIT to `-1` to enable unlimited swap.
kpod generates a UUID for each container, and if a name is not assigned
to the container with **--name** then the daemon will also generate a random
-string name. The name is useful when defining links (see **--link**) (or any
-other place you need to identify a container). This works for both background
-and foreground containers.
+string name. The name is useful any place you need to identify a container.
+This works for both background and foreground containers.
**--network**="*bridge*"
Set the Network mode for the container
@@ -503,8 +502,7 @@ must be an absolute path as well. kpod bind-mounts the `HOST-DIR` to the
path you specify. For example, if you supply the `/foo` value, kpod creates a bind-mount.
You can specify multiple **-v** options to mount one or more mounts to a
-container. To use these same mounts in other containers, specify the
-**--volumes-from** option also.
+container.
You can add `:ro` or `:rw` suffix to a volume to mount it read-only or
read-write mode, respectively. By default, the volumes are mounted read-write.
@@ -557,24 +555,6 @@ change propagation properties of source mount. Say `/` is source mount for
To disable automatic copying of data from the container path to the volume, use
the `nocopy` flag. The `nocopy` flag can be set on bind mounts and named volumes.
-**--volumes-from**=[]
- Mount volumes from the specified container(s)
-
- Mounts already mounted volumes from a source container onto another
- container. You must supply the source's container-id. To share
- a volume, use the **--volumes-from** option when running
- the target container. You can share volumes even if the source container
- is not running.
-
- By default, kpod mounts the volumes in the same mode (read-write or
- read-only) as it is mounted in the source container. Optionally, you
- can change this by suffixing the container-id with either the `:ro` or
- `:rw ` keyword.
-
- If the location of the volume from the source container overlaps with
- data residing on a target container, then the volume hides
- that data on the target.
-
**-w**, **--workdir**=""
Working directory inside the container
@@ -729,25 +709,6 @@ following:
# kpod run -p 8080:80 -d -i -t fedora/httpd
-## Creating and Mounting a Data Volume Container
-
-Many applications require the sharing of persistent data across several
-containers. kpod allows you to create a Data Volume Container that other
-containers can mount from. For example, create a named container that contains
-directories /var/volume1 and /tmp/volume2. The image will need to contain these
-directories so a couple of RUN mkdir instructions might be required for you
-fedora-data image:
-
- # kpod run --name=data -v /var/volume1 -v /tmp/volume2 -i -t fedora-data true
- # kpod run --volumes-from=data --name=fedora-container1 -i -t fedora bash
-
-Multiple --volumes-from parameters will bring together multiple data volumes from
-multiple containers. And it's possible to mount the volumes that came from the
-DATA container in yet another container via the fedora-container1 intermediary
-container, allowing to abstract the actual data source from users of that data:
-
- # kpod run --volumes-from=fedora-container1 --name=fedora-container2 -i -t fedora bash
-
## Mounting External Volumes
To mount a host directory as a container volume, specify the absolute path to