【问题标题】:Unable to use make in alpine image无法在高山图像中使用 make
【发布时间】:2019-03-15 21:10:59
【问题描述】:

我无法让make 在高山工作 make update_tools 在我的 OSX 上运行它时有效,但是当我在 alpine 映像中运行它时,我收到以下错误: make: *** 没有规则来制作目标“update_tools”。停止。 这是我的 Dockerfile 现在的样子:

#Download base image Alpine-3.9  Golang 1.12 
FROM golang:1.12-alpine3.9

# Set Working Directory is /usr/app
WORKDIR /usr/app

# Install Alpine Dependencies
RUN apk update && apk upgrade && apk add --update alpine-sdk && \
    apk add --no-cache bash git openssh make cmake 

COPY cosmos-sdk .

WORKDIR /usr/app/cosmos-sdk

RUN git checkout v0.33.0 && \
    make update_tools && \ 
    make vendor-deps && \ 
    make install && \
    gaiad init $(whoami) && \
    rm .gaiad/config/genesis.json && \
    curl https://raw.githubusercontent.com/cosmos/launch/master/genesis.json > $HOME/.gaiad/config/genesis.json 

#Add persistent peer to config.toml file
RUN sed -i '' 's/persistent_peers = ""/persistent_peers = "89e4b72625c0a13d6f62e3cd9d40bfc444cbfa77@34.65.6.52:26656"/' $HOME/.gaiad/config/config.toml 

#Start gaid daemon and set logging to info
CMD ["gaiad start --log_level="*:info""]

# Expose the ports
EXPOSE 26656 26657

生成文件:https://github.com/cosmos/cosmos-sdk/blob/develop/Makefile

我将不胜感激任何指针

【问题讨论】:

  • 你能发布你的 Makefile 吗?
  • 共享@michalhosna

标签: docker makefile alpine


【解决方案1】:

Direct clone and checkout v0.33.0 没有提到问题。 git checkout v0.33.0 命令似乎有问题。可能您有未提交的更改。请检查/提供docker build 输出。

【讨论】:

    【解决方案2】:

    有一个类似的问题,请确保您的 Makefile 已添加到 docker 映像中,我的 Makefile 已添加到 .dockerignore 文件中,因此它不存在于 docker 映像中,并且我收到了类似的错误消息

    【讨论】:

      猜你喜欢
      • 2020-05-08
      • 2018-08-01
      • 2021-10-15
      • 1970-01-01
      • 1970-01-01
      • 2018-06-16
      • 1970-01-01
      • 2022-01-07
      • 1970-01-01
      相关资源
      最近更新 更多