mirror of
https://github.com/alexgo-io/stacks-blockchain-api.git
synced 2026-04-30 13:52:28 +08:00
chore: use release builds for stacks-node binary
This commit is contained in:
@@ -57,7 +57,7 @@ const buildDist = () => new Promise((resolve, reject) => {
|
||||
return;
|
||||
}
|
||||
console.log(`Building stacks-blockchain binaries into '${buildOutputDir}'`);
|
||||
const cargoCmd = `cargo install --git https://github.com/blockstack/stacks-blockchain.git --rev "${gitCommit}" stacks-testnet --bin=${envVars.STACKS_BLOCKCHAIN_BIN} --debug --root /build-out`;
|
||||
const cargoCmd = `cargo install --git https://github.com/blockstack/stacks-blockchain.git --rev "${gitCommit}" stacks-testnet --bin=${envVars.STACKS_BLOCKCHAIN_BIN} --root /build-out`;
|
||||
const dockerRunCmd = `docker run -v "${buildOutputDir}:/build-out" rust:stretch ${cargoCmd}`;
|
||||
console.log(`Running build via docker: ${dockerRunCmd}`);
|
||||
const result = spawn(dockerRunCmd, {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
FROM debian:stretch
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates curl jq
|
||||
FROM everpeace/curl-jq as build
|
||||
|
||||
ENV ARTIFACTS "http://blockstack-stacks-blockchain_artifacts.storage.googleapis.com/index.json"
|
||||
|
||||
RUN curl -s "$ARTIFACTS" --output ./artifacts-resp.json \
|
||||
&& cat ./artifacts-resp.json | jq -r '."stacks-node"."linux-x64".latest.url' > ./url \
|
||||
&& mkdir -p /app \
|
||||
@@ -11,7 +9,11 @@ RUN curl -s "$ARTIFACTS" --output ./artifacts-resp.json \
|
||||
&& curl --compressed $(cat ./url) --output /bin/stacks-node \
|
||||
&& chmod +x /bin/stacks-node
|
||||
|
||||
FROM debian:stable-slim
|
||||
|
||||
COPY wait-for-it.sh /bin/wait-for-it.sh
|
||||
RUN chmod +x /bin/wait-for-it.sh
|
||||
|
||||
COPY --from=build /bin/stacks-node /bin/
|
||||
|
||||
CMD ["stacks-node"]
|
||||
|
||||
Reference in New Issue
Block a user