forked from Gravity-Bridge/Gravity-Bridge
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ebad91
commit 4f5dc43
Showing
4 changed files
with
19 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters