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

Support new --checksum flag for ADD instructions #116

Closed
rcjsuen opened this issue Sep 8, 2023 · 0 comments
Closed

Support new --checksum flag for ADD instructions #116

rcjsuen opened this issue Sep 8, 2023 · 0 comments
Assignees

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Sep 8, 2023

The feature is not supported out-of-the-box but can be enabled with #syntax=docker/dockerfile:1

FROM alpine
ADD --checksum=sha256:24454f830cdb571e2c4ad15481119c43b3cafd48dd869a9b2945d1036d1dc68d https://mirrors.edge.kernel.org/pub/linux/kernel/Historic/linux-0.01.tar.gz /
$ docker build .
[+] Building 0.2s (3/3) FINISHED                                                                docker:default
 => [internal] load .dockerignore                                                                         0.0s
 => => transferring context: 2B                                                                           0.0s
 => [internal] load build definition from Dockerfile                                                      0.0s
 => => transferring dockerfile: 216B                                                                      0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                          0.2s
Dockerfile:2
--------------------
   1 |     FROM alpine
   2 | >>> ADD --checksum=sha256:24454f830cdb571e2c4ad15481119c43b3cafd48dd869a9b2945d1036d1dc68d https://mirrors.edge.kernel.org/pub/linux/kernel/Historic/linux-0.01.tar.gz /
   3 |
--------------------
ERROR: failed to solve: instruction 'ADD --checksum=<CHECKSUM>' requires the labs channel
#syntax=docker/dockerfile:1
FROM alpine
ADD --checksum=sha256:24454f830cdb571e2c4ad15481119c43b3cafd48dd869a9b2945d1036d1dc68d https://mirrors.edge.kernel.org/pub/linux/kernel/Historic/linux-0.01.tar.gz /
Line: 3
ADD --checksum=sha256:24454f830cdb571e2c4ad15481119c43b3cafd48dd869a9b2945d1036d1dc68d https://mirrors.edge.kernel.org/pub/linux/kernel/Historic/linux-0.01.tar.gz /
    ^^^^^^^^^^
Error: Unknown flag: checksum
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