Skip to content

Commit

Permalink
small build dockerfile orchestrator
Browse files Browse the repository at this point in the history
  • Loading branch information
tubackkhoa authored and ducphamle2 committed Feb 1, 2023
1 parent 6ebad91 commit 4f5dc43
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 28 deletions.
15 changes: 8 additions & 7 deletions module/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
FROM golang:1.18-alpine as builder

FROM golang:1.18-alpine3.17 as builder
WORKDIR /workspace
COPY . /workspace
# this comes from standard alpine nightly file
# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile
# with some changes to support our toolchain, etc
RUN set -eux; apk add --no-cache ca-certificates build-base;
RUN apk add upx bash jq
RUN apk add upx
# NOTE: add these to run with LEDGER_ENABLED=true
# RUN apk add libusb-dev linux-headers
RUN make build LEDGER_ENABLED=false BUILD_TAGS=muslc
RUN upx --best --lzma /workspace/build/gravity

WORKDIR /workspace
COPY . /workspace/

RUN make install LEDGER_ENABLED=false BUILD_TAGS=muslc
FROM alpine:3.17
COPY --from=builder /workspace/build/gravity /usr/bin/gravity
10 changes: 0 additions & 10 deletions module/Dockerfile.prod

This file was deleted.

16 changes: 8 additions & 8 deletions orchestrator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM rust:1.66.0

RUN apt update && apt install curl nano -y

FROM rust:1.66.0-alpine3.17 as builder
WORKDIR /workspace
COPY . /workspace/

COPY . /workspace
# musl-dev to include h files, and make + perl to build openssl-sys
RUN apk add musl-dev make perl upx
RUN rustup default stable
RUN cargo build -p gbt --release
RUN upx --best --lzma /workspace/target/release/gbt

RUN cargo build --all
CMD [ "cargo run -p gbt -V" ]
FROM alpine:3.17
COPY --from=builder /workspace/target/release/gbt /usr/bin/gbt
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ docker build -t oraichain/foundation-oraibridge-module:0.0.1 ./module
# EVM fork build with Hardhat environment
docker build -t oraichain/foundation-oraibridge-evmfork:0.0.1 ./solidity

# Production build
docker build -t oraichain/foundation-oraibridge-module-prod:0.0.1 -f module/Dockerfile.prod ./module
# Gbt build
docker build -t oraichain/foundation-oraibridge-orchestrator:0.0.1 ./orchestrator

```
```

0 comments on commit 4f5dc43

Please sign in to comment.