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

Publish diagnostic that validates a build stage's name #132

Closed
rcjsuen opened this issue Aug 5, 2017 · 0 comments
Closed

Publish diagnostic that validates a build stage's name #132

rcjsuen opened this issue Aug 5, 2017 · 0 comments
Assignees

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Aug 5, 2017

A build stage may not start with a number or contain symbols. It does allow a _, a - or a . though. It cannot start with one of those symbols either.

FROM alpine AS a_lpi-n.e99
$ docker build .
Sending build context to Docker daemon  86.15MB
Step 1/1 : FROM alpine AS a_lpi-n.e99
 ---> 7328f6f8b418
Successfully built 7328f6f8b418
FROM scratch AS 1s
$ docker build .
Sending build context to Docker daemon  86.15MB
Step 1/1 : FROM scratch AS 1s
invalid name for build stage: "1s", name can't start with a number or contain symbols
FROM alpine AS _s
$ docker build .
Sending build context to Docker daemon  86.15MB
Step 1/1 : FROM alpine AS _s
invalid name for build stage: "_s", name can't start with a number or contain symbols
FROM alpine AS a_lpi-n.e,99
$ docker build .
Sending build context to Docker daemon  86.15MB
Step 1/1 : 
invalid name for build stage: "a_lpi-n.e,99", name can't start with a number or contain symbols
@rcjsuen rcjsuen self-assigned this Aug 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant