I am using this plugin:
.drone.yaml
kind: pipeline
name: Test
steps:
- name: build
image: plugins/docker
settings:
environment:
DOCKER_BUILDKIT: 1
registry: harbor.mydomain.com
username:
from_secret: HARBOR-USERNAME
password:
from_secret: HARBOR-SECRET
repo: harbor.mydomain.com/project/php
tags: latest
dockerfile: dockerfile-php
experimental: true
ssh-agent-key:
from_secret: BITBUCKET-KEY
dockerfile-php
FROM php:7-fpm
RUN apt-get update && apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions \
&& install-php-extensions curl exif gd gettext mbstring pdo_mysql xdebug zip
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php && \
php -r "unlink('composer-setup.php');"
RUN mkdir -p -m 0700 ~/.ssh && ssh-keyscan bitbucket.org >> ~/.ssh/known_hosts
RUN --mount=type=ssh
COPY ./website /var/www/html
WORKDIR /var/www/html
RUN php composer.phar install \
&& php composer.phar require sendgrid/sendgrid
Drone shows:
Step 7/14 : RUN --mount=type=ssh
the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled
exit status 1
May I know how to enable buildkit?
Thanks.