Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How should cyclops interact with the image cache? #41

Open
cllunsford opened this issue Jul 23, 2015 · 1 comment
Open

How should cyclops interact with the image cache? #41

cllunsford opened this issue Jul 23, 2015 · 1 comment
Labels

Comments

@cllunsford
Copy link
Member

Currently, layers generated by cyclops aren't used by other builds, due to differences in the resulting container config:

    "ContainerConfig": {                        "ContainerConfig": {
        "Hostname": "dd360632d03c",               |         "Hostname": "f56ae10d5429",
        "Domainname": "",                           "Domainname": "",
        "User": "",                             "User": "",
        "AttachStdin": false,                           "AttachStdin": false,
        "AttachStdout": false,                          "AttachStdout": false,
        "AttachStderr": false,                          "AttachStderr": false,
        "PortSpecs": null,                          "PortSpecs": null,
        "ExposedPorts": null,                           "ExposedPorts": null,
        "Tty": false,                               "Tty": false,
        "OpenStdin": false,                         "OpenStdin": false,
        "StdinOnce": false,                         "StdinOnce": false,
        "Env": [                          |         "Env": null,
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/u <
        ],                            <
        "Cmd": [                                "Cmd": [
            "/bin/sh",                        |             "/bin/bash",
            "-c",                                   "-c",
            "mkdir -p /tmp/bar"                             "mkdir -p /tmp/bar"
        ],                                  ],
        "Image": "d2a0ecffe6fa4ef3de9646a75cc629bbd9da7eead7f |         "Image": "ubuntu:trusty",
        "Volumes": null,                            "Volumes": null,
        "VolumeDriver": "",                         "VolumeDriver": "",
        "WorkingDir": "",                           "WorkingDir": "",
        "Entrypoint": null,                         "Entrypoint": null,
        "NetworkDisabled": false,                       "NetworkDisabled": false,
        "MacAddress": "",                           "MacAddress": "",
        "OnBuild": [],                        |         "OnBuild": null,
        "Labels": {}                                "Labels": {}

Also, does it make sense for cyclops to use layers already in the cache? Switching cyclops to use a docker build call instead of docker run would speed up the build at the cost of aggressive cache usage.

@cllunsford
Copy link
Member Author

Looking at docker source, the Env and Cmd differences are what drive the cache miss. OnBuild, Image, and Hostname are not checked for equality.

cllunsford added a commit that referenced this issue Jul 23, 2015
This means that issuing :run foo is equivalent to a line in dockerfile
"RUN foo", and the cache should be leveraged in either direction by
the docker daemon.  Tested in cyclops -> docker build. Unsure of
desired behavior within the repl (should cache be disabled in repl?)

Addresses #41.
@cllunsford cllunsford modified the milestone: 0.1.0 Jul 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant