mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-01-13 08:40:45 +08:00
debug symbols working in alpine with lldb
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -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"]
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
FROM rust:stretch as build
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir /out
|
||||
|
||||
RUN cd testnet/stacks-node && cargo build --release --features "monitoring_prom"
|
||||
RUN cd testnet/bitcoin-neon-controller && cargo build --release
|
||||
|
||||
RUN cp target/release/stacks-node /out
|
||||
RUN cp target/release/bitcoin-neon-controller /out
|
||||
|
||||
FROM debian:stretch-slim
|
||||
|
||||
COPY --from=build /out/ /bin/
|
||||
|
||||
CMD ["stacks-node", "argon"]
|
||||
12
circle.yml
12
circle.yml
@@ -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:
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user