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

Extra empty newlines causes arguments to be split up when they should be left intact as one #34

Closed
rcjsuen opened this issue May 24, 2018 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented May 24, 2018

The below Dockerfile is valid and builds without any problems save for the warning about the empty continuation line.

FROM alp\

ine
$ docker build .
Sending build context to Docker daemon  1.695MB
[WARNING]: Empty continuation line found in:
    FROM alpine
[WARNING]: Empty continuation lines will become errors in a future release.
Step 1/1 : FROM alpine
 ---> 3fd9065eaf02
Successfully built 3fd9065eaf02
[node1] (local) root@192.168.0.8 ~

We expect only one argument to FROM but the parser thinks there are two!

import { DockerfileParser, Label } from './main';

const content = "FROM alp\\\n\nine";

let dockerfile = DockerfileParser.parse(content);
console.log(dockerfile.getInstructions()[0].getArguments().length);
2
@rcjsuen rcjsuen added the bug label May 24, 2018
@rcjsuen rcjsuen self-assigned this May 24, 2018
rcjsuen added a commit that referenced this issue May 25, 2018
Signed-off-by: Remy Suen <remy.suen@gmail.com>
rcjsuen added a commit that referenced this issue May 25, 2018
Signed-off-by: Remy Suen <remy.suen@gmail.com>
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