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

Improve Dockerfile #1071

Merged
merged 2 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Minor improvements & Bug Fixes

* [#1061](https://github.com/osmosis-labs/osmosis/pull/1061) upgrade iavl to v0.17.3-osmo-v5 with concurrent map write fix
* [#1071](https://github.com/osmosis-labs/osmosis/pull/1071) improve Dockerfile

### SDK fork updates

Expand Down
28 changes: 14 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# syntax=docker/dockerfile:1

## Build
## Build Image
FROM golang:1.17-bullseye as build

WORKDIR /osmosis
COPY . /osmosis
RUN make build

## Deploy
FROM gcr.io/distroless/base-debian11
# From https://github.com/CosmWasm/wasmd/blob/master/Dockerfile
# For more details see https://github.com/CosmWasm/wasmvm#builds-of-libwasmvm
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.0.0-beta7/libwasmvm_muslc.a /lib/libwasmvm_muslc.a
RUN sha256sum /lib/libwasmvm_muslc.a | grep d0152067a5609bfdfb3f0d5d6c0f2760f79d5f2cd7fd8513cafa9932d22eb350
RUN BUILD_TAGS=muslc make build

WORKDIR /
## Deploy image
FROM gcr.io/distroless/base-debian11:nonroot

# wasm dependencies
COPY --from=build /go/pkg/mod/github.com/!cosm!wasm/[email protected]/api/libwasmvm.so /lib/
COPY --from=build /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/
COPY --from=build /osmosis/build/osmosisd /bin/osmosisd

# osmosisd binary
COPY --from=build /osmosis/build/osmosisd /osmosisd
ENV HOME /osmosis
WORKDIR $HOME

EXPOSE 26656
EXPOSE 26656
EXPOSE 26657
EXPOSE 1317
EXPOSE 9090
EXPOSE 1317

ENTRYPOINT ["/osmosisd"]
ENTRYPOINT ["osmosisd"]