chore: use release builds for stacks-node binary

This commit is contained in:
Matthew Little
2020-05-01 09:44:47 +02:00
parent 7d26448a2b
commit 84d5411293
2 changed files with 7 additions and 5 deletions

View File

@@ -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, {

View File

@@ -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"]