Skip to content

Commit

Permalink
debug symbols working in alpine with lldb
Browse files Browse the repository at this point in the history
  • Loading branch information
kantai committed Jul 21, 2020
1 parent a19dfe0 commit c805c39
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 43 deletions.
19 changes: 7 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
FROM rust:stretch as build
FROM rust:alpine as build

WORKDIR /src

COPY . .

RUN rustup target add x86_64-unknown-linux-musl && \
apt-get update && apt-get install -y git musl-tools

ENV CC musl-gcc
ENV CC_x86_64_unknown_linux_musl musl-gcc
ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER musl-gcc
RUN apk add --no-cache musl-dev

RUN mkdir /out

RUN cd testnet/stacks-node && cargo build --features "monitoring_prom" --target x86_64-unknown-linux-musl
RUN cd testnet/bitcoin-neon-controller && cargo build --target x86_64-unknown-linux-musl
RUN cd testnet/stacks-node && cargo build --features "monitoring_prom" --release
RUN cd testnet/bitcoin-neon-controller && cargo build --release

RUN cp target/x86_64-unknown-linux-musl/debug/stacks-node /out
RUN cp target/x86_64-unknown-linux-musl/debug/bitcoin-neon-controller /out
RUN cp target/release/stacks-node /out
RUN cp target/release/bitcoin-neon-controller /out

FROM alpine

COPY --from=build /out/ /bin/

CMD ["stacks-node", "argon"]
CMD ["stacks-node", "argon"]
19 changes: 0 additions & 19 deletions Dockerfile.stretch

This file was deleted.

12 changes: 0 additions & 12 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,9 @@ jobs:
- run:
name: build docker image
command: docker build . -t $IMAGE_NAME:latest
- run:
name: build debug docker image
command: docker build . -f Dockerfile.stretch -t $IMAGE_NAME-stretch:latest
- run:
name: save image to workspace
command: docker save -o image.tar $IMAGE_NAME:latest
- run:
name: save image to workspace
command: docker save -o image-stretch.tar $IMAGE_NAME-stretch:latest
- persist_to_workspace:
root: .
paths:
Expand All @@ -91,20 +85,14 @@ jobs:
- run:
name: load docker image
command: docker load -i /tmp/workspace/image.tar
- run:
name: load docker image
command: docker load -i /tmp/workspace/image-stretch.tar
- run:
name: push docker image
command: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
if [ "${CIRCLE_BRANCH}" = "master" ]; then
docker tag $IMAGE_NAME:latest $IMAGE_NAME:master
docker tag $IMAGE_NAME-stretch:latest $IMAGE_NAME-stretch:master
docker push $IMAGE_NAME:latest
docker push $IMAGE_NAME:master
docker push $IMAGE_NAME-stretch:latest
docker push $IMAGE_NAME-stretch:master
elif [ "${CIRCLE_BRANCH}" = "feature/docker-deploy" ]; then
docker tag $IMAGE_NAME:latest $IMAGE_NAME:test-deploy
docker push $IMAGE_NAME:test-deploy
Expand Down

0 comments on commit c805c39

Please sign in to comment.