drone-plugins / drone-docker

Drone plugin for publishing Docker images

Home Page:http://plugins.drone.io/drone-plugins/drone-docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image plugins/docker can be used, but image built with source code will report errors

duanzheng opened this issue · comments

Hello, thank you for your work, but I have a problem and would like to ask. I use the latest code to package the image, and then put it on Drone and run it will give an error:

time="2020-04-29T05:48:34Z" level=fatal msg="Error authenticating: exit status 1"

The shell command of my package image is:

export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on

go build -v -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker

docker build \
  --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
  --file docker/docker/Dockerfile.linux.amd64 --tag plugins/docker .

But using plugins/docker image is no problem. To add, my docker registry requires login to access

I don't understand what you try or want to archive.