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

RUN instruction does not need any arguments #102

Closed
rcjsuen opened this issue Sep 18, 2021 · 0 comments
Closed

RUN instruction does not need any arguments #102

rcjsuen opened this issue Sep 18, 2021 · 0 comments
Assignees

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Sep 18, 2021

Seems like you can have zero instructions for RUN when using BuildKit so we should add support for this.

FROM alpine:latest
RUN --mount=type=cache,target=/var/cache/foo,uid=1,gid=1
RUN
$ DOCKER_BUILDKIT=1 docker build --no-cache .
[+] Building 1.6s (8/8) FINISHED                                                                                           
 => [internal] load build definition from Dockerfile                                                                  0.0s
 => => transferring dockerfile: 116B                                                                                  0.0s
 => [internal] load .dockerignore                                                                                     0.0s
 => => transferring context: 2B                                                                                       0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                                      0.1s
 => CACHED [stage-0 1/3] FROM docker.io/library/alpine:latest@sha256:e1c082e3d3c45cccac829840a25941e679c25d438cc8412  0.0s
 => CACHED [internal] settings cache mount permissions                                                                0.0s
 => [stage-0 2/3] RUN --mount=type=cache,target=/var/cache/foo,uid=1,gid=1                                            0.8s
 => [stage-0 3/3] RUN                                                                                                 0.7s
 => exporting to image                                                                                                0.0s
 => => exporting layers                                                                                               0.0s
 => => writing image sha256:e3ee95c220624a5742c40a4fd98a3161d7b50a9c582bf3b1a2387a4679aebe54                          0.0s
$ node bin/dockerfile-utils lint
Line: 2
RUN --mount=type=cache,target=/var/cache/foo,uid=1,gid=1
^^^
Error: Instruction has no arguments

Line: 3
RUN
^^^
Error: Instruction has no arguments
@rcjsuen rcjsuen self-assigned this Sep 18, 2021
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