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

Escaped whitespace variable values in ENV instructions are incorrect #115

Closed
rcjsuen opened this issue Aug 1, 2017 · 0 comments
Closed
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Aug 1, 2017

FROM scratch
ENV var=\  var2=\

Given the above Dockerfile, hovering over var should give as its value. However, an empty string is returned instead.

$ docker build .
Sending build context to Docker daemon  86.15MB
Step 1/2 : FROM scratch
 --->
Step 2/2 : ENV var \  var2
 ---> Running in 4c2cbfe43c37
 ---> 6f1edc381410
Removing intermediate container 4c2cbfe43c37
Successfully built 6f1edc381410
$ docker inspect 6f1ed
[
    {
        "Id": "sha256:6f1edc3814101cbefed44b9d0cd358bcb5f794517bd964223102e6b1d4cafc02",
        "RepoTags": [],
        "RepoDigests": [],
        "Parent": "",
        "Comment": "",
        "Created": "2017-08-01T02:53:45.530476498Z",
        "Container": "4c2cbfe43c37b37a2bfb0b2eae2cea070a6af73d510e4f158e4c187d3051df24",
        "ContainerConfig": {
            "Hostname": "4c2cbfe43c37",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "var= ",
                "var2="
            ],
            "Cmd": [
                "/bin/sh",
                "-c",
                "#(nop) ",
                "ENV var=  var2="
            ],
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "DockerVersion": "17.06.1-ce-rc1",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "var= ",
                "var2="
            ],
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 0,
        "VirtualSize": 0,
        "GraphDriver": {
            "Data": null,
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers"
        }
    }
]
@rcjsuen rcjsuen added the bug label Aug 1, 2017
@rcjsuen rcjsuen closed this as completed in f329e04 Aug 1, 2017
@rcjsuen rcjsuen assigned rcjsuen and unassigned rcjsuen Aug 1, 2017
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