GithubHelp home page GithubHelp logo

Comments (7)

kelseyhightower avatar kelseyhightower commented on September 26, 2024

After making the following adjustments to the docker file, I get something that works for me. This is still a bug if we want to support volumes defined in a JSON array.

The fix is to not use a JSON array to define volumes in the docker file.

VOLUME /var/lib/docker /var/lib/kubelet /var/run /sys /etc/kubernetes /etc/ssl/certs /rootfs /nsenter /usr /lib64

The results

$ docker2aci docker://quay.io/kelseyhightower/kubelet:0.19.0
Downloading c6b09d8961e4: [====================================] 32 B/32 B
Downloading 57858edd3470: [====================================] 7.92 MB/7.92 MB
Downloading 1a4168fc39d8: [====================================] 32 B/32 B
Downloading 92c62d2e9e70: [====================================] 32 B/32 B

Converted volumes:
    name: "volume-nsenter", path: "/nsenter", readOnly: false
    name: "volume-rootfs", path: "/rootfs", readOnly: false
    name: "volume-usr", path: "/usr", readOnly: false
    name: "volume-var-lib-kubelet", path: "/var/lib/kubelet", readOnly: false
    name: "volume-var-run", path: "/var/run", readOnly: false
    name: "volume-etc-kubernetes", path: "/etc/kubernetes", readOnly: false
    name: "volume-etc-ssl-certs", path: "/etc/ssl/certs", readOnly: false
    name: "volume-lib64", path: "/lib64", readOnly: false
    name: "volume-sys", path: "/sys", readOnly: false
    name: "volume-var-lib-docker", path: "/var/lib/docker", readOnly: false

Generated ACI(s):
kelseyhightower-kubelet-0.19.0.aci

from docker2aci.

yifan-gu avatar yifan-gu commented on September 26, 2024

@kelseyhightower Thanks for reporting will take a look :)

from docker2aci.

iaguis avatar iaguis commented on September 26, 2024

I'm trying to reproduce this without success.

Dockerfile:

FROM scratch

ADD busybox /bin/busybox

VOLUME ["/test", "/test2"]

CMD ["/bin/busybox", "sh"]

Then:

iaguis@locke-work: ~/temp/rkt/volumes
> docker build .
Sending build context to Docker daemon 934.4 kB
Sending build context to Docker daemon 
Step 0 : FROM scratch
 ---> 
Step 1 : ADD busybox /bin/busybox
 ---> 7e366b67d1b0
Removing intermediate container 571daf6eb9c5
Step 2 : VOLUME /test /test2
 ---> Running in 617a8f290200
 ---> b25c82585106
Removing intermediate container 617a8f290200
Step 3 : CMD /bin/busybox sh
 ---> Running in 828c1bb9b0c3
 ---> 7e860c3a005e
Removing intermediate container 828c1bb9b0c3
Successfully built 7e860c3a005e
iaguis@locke-work: ~/temp/rkt/volumes
> docker tag  7e860c3a005e busybox-test-volumes
iaguis@locke-work: ~/temp/rkt/volumes
> docker save -o test-volumes.docker busybox-test-volumes
iaguis@locke-work: ~/temp/rkt/volumes
> docker2aci test-volumes.docker 
Extracting 7e366b67d1b0
Extracting b25c82585106
Extracting 7e860c3a005e

Converted volumes:
        name: "volume-test", path: "/test", readOnly: false
        name: "volume-test2", path: "/test2", readOnly: false

Generated ACI(s):
busybox-test-volumes-latest.aci
iaguis@locke-work: ~/temp/rkt/volumes
> actool cat-manifest --pretty-print busybox-test-volumes-latest.aci
{
    "acKind": "ImageManifest",
    "acVersion": "0.5.1",
    "name": "busybox-test-volumes",
    "labels": [
        {
            "name": "version",
            "value": "latest"
        },
        {
            "name": "os",
            "value": "linux"
        }
    ],
    "app": {
        "exec": [
            "/bin/busybox",
            "sh"
        ],
        "user": "0",
        "group": "0",
        "mountPoints": [
            {
                "name": "volume-test",
                "path": "/test"
            },
            {
                "name": "volume-test2",
                "path": "/test2"
            }
        ]
    },
    "annotations": [
        {
            "name": "created",
            "value": "2015-06-30T15:33:00Z"
        }
    ]
}

from docker2aci.

jonboulle avatar jonboulle commented on September 26, 2024

@iaguis does it reproduce consistently with kelsey's image?

from docker2aci.

iaguis avatar iaguis commented on September 26, 2024

He adjusted his Dockerfile so I can't reproduce it either.

from docker2aci.

jonboulle avatar jonboulle commented on September 26, 2024

oh right, docker images aren't immutable ;-)

from docker2aci.

jonboulle avatar jonboulle commented on September 26, 2024

Closing as we couldn't reproduce.

from docker2aci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.