docker - 无法在 Alpine 图像中使用 make

我无法让 make 在 alpine 中工作 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

如有任何指点,我将不胜感激

最佳答案

我有这个问题。

这似乎来自 golang-alpine 图像本身。

** --- 解决方案 --- **

只需在您的镜像中安装 make,如下所示:

apk add --no-cache make

https://stackoverflow.com/questions/55190714/

相关文章:

html - 在 <input> 上使用 onChange 时未注册空间

ruby-on-rails - 如何锁定表以防止在 Rails 中使用记录创建?

javascript - react-redux:元素类型无效

python-3.x - Python3 requests.get 太慢

angular - 有没有办法以编程方式触发 Angular 中的 onchange 事件? ( t

angular - 如何在 Angular 7 中等待直到 DOM 准备就绪?

ipython - 如何在 jupyter 笔记本中插入制表符而不是自动完成?

git - 如何修复 git bash 错误异常 : STATUS_ACCESS_VIOLATION

react-native - 错误无法构建 iOS 项目。我们运行了 "xcodebuild"命令,

php - 清除 Lumen 框架中的缓存