要在无人机中构建泊坞窗图像,请收到错误" / bin / sh:1:base64:not found"。怎么解决?

时间:2018-01-10 03:04:20

标签: linux docker drone drone.io

我的.drone.yml文件定义如下

branches:
  include: [ master, dev ]
  exclude: [ develop, feature/* ]
clone:
  git:
    image: plugins/git
    depth: 50
workspace:
  base: /go
  path: src/xx.com/metis
pipeline:
  build:
    when:
      branch: master
    image: golang:alpine
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - CGO=0
      - GOOS=linux
      - GOARCH=amd64
      - PATH=$PATH:/go
      - GOPATH=/go
    commands:
      - go env
      - go build -v -o metis

由无人机建造得到如下图片的错误。

"/bin/sh: 1: base64: not found "

1 个答案:

答案 0 :(得分:0)

这个问题解决了!在.drone.yml文件中的“环境”节点 - PATH = $ GOPATH / bin:/ usr / local / bin:$ PATH销毁了PATH环境。所以删除 - PATH = $ PATH:/ go行代码就可以了。

https://github.com/drone/drone/issues/2296