Skip to content

Commit

Permalink
Reintroduce alpine to the sbtc service. (#298)
Browse files Browse the repository at this point in the history
* don't build in `up.sh`

* reintroduce alpine
  • Loading branch information
CAGS295 authored Oct 18, 2023
1 parent eac5a87 commit c1b5abd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
15 changes: 6 additions & 9 deletions devenv/sbtc/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
FROM rust:bookworm as clarinet
FROM rust:alpine as clarinet

RUN apt update && apt install -y pkg-config libssl-dev clang && \
rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache g++ musl-dev git openssl-dev clang-dev

RUN cargo install clarinet-cli --bin clarinet --branch develop --locked --git https://github.com/hirosystems/clarinet.git

FROM rust:bookworm as romeo
FROM rust:alpine as romeo

RUN apt update && apt install -y g++ libssl-dev clang libsecp256k1-dev && \
rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache g++ musl-dev git openssl-dev clang-dev libsecp256k1-dev

RUN cargo install --locked cargo-make

Expand All @@ -19,10 +17,9 @@ ENV RUSTFLAGS "-C target-feature=-crt-static"
RUN cargo install --locked --path sbtc-cli
RUN cargo install --locked --path romeo

FROM rust:slim-bookworm
FROM alpine:latest

RUN apt update && apt install -y openssl libsecp256k1-dev curl jq && \
rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache g++ openssl libsecp256k1 curl jq

COPY --from=clarinet /usr/local/cargo/bin/clarinet /usr/local/bin
COPY --from=romeo /usr/local/cargo/bin/sbtc /usr/local/bin
Expand Down
2 changes: 1 addition & 1 deletion devenv/sbtc/docker/entrypoint
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

set -euo >/dev/null

Expand Down
3 changes: 1 addition & 2 deletions devenv/up.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env bash

if [ $? -eq 0 ]
then
if [ $? -eq 0 ]; then
docker compose up -d
else
echo "Build failed, not starting devenv"
Expand Down

0 comments on commit c1b5abd

Please sign in to comment.