Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup dockerfile and add coral support #227

Merged
merged 2 commits into from
Jul 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@ RUN export GO_WASM_DIR=$(go list -f "{{ .Dir }}" -m github.com/CosmWasm/go-cosmw
FROM cosmwasm/go-ext-builder:0.8.2-alpine AS go-builder

RUN apk add git
# without this, build with LEDGER_ENABLED=false
RUN apk add libusb-dev linux-headers
# NOTE: add these to run with LEDGER_ENABLED=true
# RUN apk add libusb-dev linux-headers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is another block like this a few lines above (line 6-7). Should we do the same there as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I can remove that one entirely.
I guess I'll throw that in an existing branch - #229 to avoid a micro-pr

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


WORKDIR /code
COPY . /code/

COPY --from=rust-builder /lib/libgo_cosmwasm_muslc.a /lib/libgo_cosmwasm_muslc.a

# force it to use static lib (from above) not standard libgo_cosmwasm.so file
RUN BUILD_TAGS=muslc make build
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc make build
# we also (temporarily) build the testnet binaries here
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc make build-coral

# --------------------------------------------------------
FROM alpine:3.12
Expand All @@ -42,6 +44,10 @@ COPY --from=go-builder /code/build/wasmd /usr/bin/wasmd
COPY --from=go-builder /code/build/wasmgovd /usr/bin/wasmgovd
COPY --from=go-builder /code/build/wasmcli /usr/bin/wasmcli

# testnet
COPY --from=go-builder /code/build/coral /usr/bin/coral
COPY --from=go-builder /code/build/corald /usr/bin/corald

COPY docker/* /opt/
RUN chmod +x /opt/*.sh

Expand Down