duanjiaren8188 2017-11-16 01:01
浏览 79

找不到Docker glide

Docker is not able to find glide, which was installed successfully in steps 3 and 4 (below). I ran

docker build .

This is the first part of the Dockerfile:

FROM golang:latest as builder

# Set up workdir
WORKDIR /go/src/github.com/cayleygraph/cayley

# Restore vendored dependencies
RUN sh -c "curl https://glide.sh/get | sh"
COPY glide.* ./
RUN glide install

But it failed on step 5 with this error:

docker build .
Sending build context to Docker daemon  65.18MB
Step 1/29 : FROM golang:latest as builder
 ---> 1a34fad76b34
Step 2/29 : WORKDIR /go/src/github.com/cayleygraph/cayley
 ---> Using cache
 ---> dd9a295edeed
Step 3/29 : RUN sh -c "curl https://glide.sh/get | sh"
 ---> Using cache
 ---> b432efdb0630
Step 4/29 : COPY glide.* ./
 ---> Using cache
 ---> 936b9f7837eb
Step 5/29 : RUN glide install
 ---> Running in b244dcff6576
/bin/sh: 1: glide: not found
The command '/bin/sh -c glide install' returned a non-zero code: 127

Installing glide worked, not sure why it's not finding the actual executable though. Any ideas?

  • 写回答

1条回答 默认 最新

  • douyabu1528 2017-11-16 01:05
    关注

    Make glide executable as well, in the Dockerfile. And skip the / in your COPY statement. Try to add this before you try to run it.

    RUN chmod +x <file>
    

    Seems like the install process only download the executable

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥30 自适应 LMS 算法实现 FIR 最佳维纳滤波器matlab方案
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动