Hello all,My example is compiling a Vue project and building it into a Docker image, then publishing it to a remote image repository. When I used the plugins/docker plugin, it prompted the following error:
+ /usr/local/bin/dockerd --data-root /var/lib/docker --host=unix:///var/run/docker.sock
Unable to reach Docker Daemon after 15 attempts.
Registry credentials or Docker config not provided. Guest mode enabled.
+ /usr/local/bin/docker version
Client:
Version: 20.10.14
API version: 1.41
Go version: go1.16.15
Git commit: a224086
Built: Thu Mar 24 01:45:09 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
exit status 1
Here is my YAML code:
kind: pipeline
type: kubernetes
name: default
steps:
- name: build
image: node:14
volumes:
- name: build
path: /app/build
commands:
- npm config set registry http://registry.npm.taobao.org
- export CHROMEDRIVER_CDNURL=https://npm.taobao.org/mirrors/chromedriver
- npm install
- npm run build
when:
event:
- push
branch:
- master
- name: upload-to-acr
image: plugins/docker
volumes:
- name: build
path: /app/build
settings:
username:
from_secret: XXXX
password:
from_secret: XXXX
repo: registry.cn-hangzhou.aliyuncs.com/lsl-testresp/drone_test_resp
tags: v${DRONE_BUILD_NUMBER}
purge: true
when:
event:
- push
- tag
volumes:
- name: build
host:
path: /home/docker/drone/build
trigger:
event:
- push
- pull_request
- rollback
- custom
please tell me what the problem is? Or can you provide an example of packaging a Vue project into a Docker image?