Reputation: 3161
I cant get make
to work in alpine
make update_tools
works when I run it on my OSX, but when i run it in the alpine image i get the following error:
make: *** No rule to make target 'update_tools'. Stop.
Here is what my Dockerfile looks like now:
#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 = "[email protected]: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
I would appreciate any pointers on this
Upvotes: 8
Views: 33076
Reputation: 495
Am having this issue.
It seems something from the golang-alpine image itself.
** --- Solution --- **
just install the make in your image as following:
apk add --no-cache make
Upvotes: 19
Reputation: 790
had a similar issue, make sure your Makefile is added to the docker image, mine Makefile was added to .dockerignore file, so it was not present in docker image and I got a similar error message
Upvotes: -1
Reputation: 28716
Direct clone and checkout v0.33.0 doesn't have mentioned problem. It looks like a problem with git checkout v0.33.0
command. Probably you have uncommitted changes. Please check/provide docker build
output.
Upvotes: -1