当我在我的操作系统上运行它时,我不能让make在高山make update_tools中工作,但是当我在高山镜像中运行它时,我得到了以下错误: 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
如果您对此有任何建议,我将不胜感激。
发布于 2019-03-16 07:21:44
Direct clone and checkout v0.33.0没有提到这个问题。这看起来像是git checkout v0.33.0命令的问题。您可能有未提交的更改。请检查/提供docker build输出。
发布于 2021-09-15 14:14:05
有一个类似的问题,确保你的Makefile被添加到docker镜像中,我的Makefile被添加到.dockerignore文件中,所以它不存在于docker镜像中,并且我得到了类似的错误信息
https://stackoverflow.com/questions/55190714
复制相似问题