mirror of
https://github.com/kubernetes-sigs/kind.git
synced 2025-12-01 07:26:05 +07:00
Merge pull request #60 from BenTheElder/volume-not-tmpfs
use a volume instead of specifically tmpfs for docker graph
This commit is contained in:
@@ -116,6 +116,12 @@ COPY [ "entrypoint/entrypoint", "/usr/local/bin/" ]
|
||||
# NOTE: this is *only* for documentation, the entrypoint is overridden at runtime
|
||||
ENTRYPOINT [ "/usr/local/bin/entrypoint", "/sbin/init" ]
|
||||
|
||||
# the docker graph must be a volume to avoid overlay on overlay
|
||||
# NOTE: we do this last because changing a volume with a Dockerfile must
|
||||
# occur before defining it.
|
||||
# See: https://docs.docker.com/engine/reference/builder/#volume
|
||||
VOLUME [ "/var/lib/docker" ]
|
||||
|
||||
# TODO(bentheelder): deal with systemd MAC address assignment
|
||||
# https://github.com/systemd/systemd/issues/3374#issuecomment-288882355
|
||||
# https://github.com/systemd/systemd/issues/3374#issuecomment-339258483
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -36,7 +36,7 @@ import (
|
||||
const DefaultImage = "kindest/node:latest"
|
||||
|
||||
// DefaultBaseImage is the default base image used
|
||||
const DefaultBaseImage = "kindest/base:v20181001-fe0a0b4"
|
||||
const DefaultBaseImage = "kindest/base:v20181008-0c5031c"
|
||||
|
||||
// DefaultMode is the default kubernetes build mode for the built image
|
||||
// see pkg/build/kube.Bits
|
||||
@@ -203,7 +203,7 @@ func (c *BuildContext) buildImage(dir string) error {
|
||||
// ensure we will delete it
|
||||
if containerID != "" {
|
||||
defer func() {
|
||||
exec.Command("docker", "rm", "-f", containerID).Run()
|
||||
exec.Command("docker", "rm", "-f", "-v", containerID).Run()
|
||||
}()
|
||||
}
|
||||
if err != nil {
|
||||
|
||||
@@ -325,6 +325,7 @@ func (c *Context) deleteNodes(names ...string) error {
|
||||
cmd := exec.Command("docker", "rm")
|
||||
cmd.Args = append(cmd.Args,
|
||||
"-f", // force the container to be delete now
|
||||
"-v", // delete volumes
|
||||
)
|
||||
cmd.Args = append(cmd.Args, names...)
|
||||
return cmd.Run()
|
||||
|
||||
@@ -59,8 +59,6 @@ func createNode(name, image, clusterLabel string) (handle *nodeHandle, err error
|
||||
"--security-opt", "seccomp=unconfined", // also ignore seccomp
|
||||
"--tmpfs", "/tmp", // various things depend on working /tmp
|
||||
"--tmpfs", "/run", // systemd wants a writable /run
|
||||
// docker in docker needs this, so as not to stack overlays
|
||||
"--tmpfs", "/var/lib/docker:exec",
|
||||
// some k8s things want /lib/modules
|
||||
"-v", "/lib/modules:/lib/modules:ro",
|
||||
"--hostname", name, // make hostname match container name
|
||||
|
||||
Reference in New Issue
Block a user