Skip to content

add docker buildkit support #328

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

Merged
merged 2 commits into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ version is the image's digest.
* `dockerfile`: *Optional.* The path of the `Dockerfile` in the directory if
it's not at the root of the directory.

* `docker_buildkit`: *Optional.* This enables a Docker BuildKit build. The value
should be set to 1 if applicable.

* `import_file`: *Optional.* A path to a file to `docker import` and then push.

* `labels`: *Optional.* A map of labels that will be added to the image.
Expand Down Expand Up @@ -322,8 +325,8 @@ will stop the build.
Run the tests with the following commands for both `alpine` and `ubuntu` images:

```sh
docker build -t docker-image-resource -f dockerfiles/alpine/Dockerfile --build-arg base_image=ubuntu:latest .
docker build -t docker-image-resource -f dockerfiles/ubuntu/Dockerfile .
docker build -t docker-image-resource -f dockerfiles/alpine/Dockerfile .
docker build -t docker-image-resource -f dockerfiles/ubuntu/Dockerfile --build-arg base_image=ubuntu:latest .
```

To use the newly built image, push it to a docker registry that's accessible to
Expand Down
1 change: 1 addition & 0 deletions assets/out
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ max_concurrent_uploads=$(jq -r '.source.max_concurrent_uploads // 3' < $payload)
export AWS_ACCESS_KEY_ID=$(jq -r '.source.aws_access_key_id // ""' < $payload)
export AWS_SECRET_ACCESS_KEY=$(jq -r '.source.aws_secret_access_key // ""' < $payload)
export AWS_SESSION_TOKEN=$(jq -r '.source.aws_session_token // ""' < $payload)
export DOCKER_BUILDKIT=$(jq -r '.source.docker_buildkit // 0' < $payload)

if private_registry "${repository}" ; then
registry="$(extract_registry "${repository}")"
Expand Down