2019-05-16 13:10:14 -07:00
|
|
|
# Simple usage with a mounted data directory:
|
|
|
|
# > docker build -t gaia .
|
2019-11-19 13:29:50 -08:00
|
|
|
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.wasmd:/root/.wasmd -v ~/.wasmcli:/root/.wasmcli gaia wasmd init
|
|
|
|
# > docker run -it -p 46657:46657 -p 46656:46656 -v ~/.wasmd:/root/.wasmd -v ~/.wasmcli:/root/.wasmcli gaia wasmd start
|
2019-05-16 13:10:14 -07:00
|
|
|
FROM golang:alpine AS build-env
|
|
|
|
|
|
|
|
# Set up dependencies
|
|
|
|
ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python
|
|
|
|
|
|
|
|
# Set working directory for the build
|
2019-11-19 13:29:50 -08:00
|
|
|
WORKDIR /go/src/github.com/cosmwasm/wasmd
|
2019-05-16 13:10:14 -07:00
|
|
|
|
|
|
|
# Add source files
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
# Install minimum necessary dependencies, build Cosmos SDK, remove packages
|
|
|
|
RUN apk add --no-cache $PACKAGES && \
|
|
|
|
make tools && \
|
|
|
|
make install
|
|
|
|
|
|
|
|
# Final image
|
|
|
|
FROM alpine:edge
|
|
|
|
|
|
|
|
# Install ca-certificates
|
|
|
|
RUN apk add --update ca-certificates
|
|
|
|
WORKDIR /root
|
|
|
|
|
|
|
|
# Copy over binaries from the build-env
|
2019-11-19 13:29:50 -08:00
|
|
|
COPY --from=build-env /go/bin/wasmd /usr/bin/wasmd
|
|
|
|
COPY --from=build-env /go/bin/wasmcli /usr/bin/wasmcli
|
2019-05-16 13:10:14 -07:00
|
|
|
|
2019-11-19 13:29:50 -08:00
|
|
|
# Run wasmd by default, omit entrypoint to ease using container with wasmcli
|
|
|
|
CMD ["wasmd"]
|