diff --git a/.github/workflows/node-build.yml b/.github/workflows/node-build.yml index 13b2b12..5c34672 100644 --- a/.github/workflows/node-build.yml +++ b/.github/workflows/node-build.yml @@ -23,7 +23,7 @@ jobs: matrix: platform: - linux/amd64 - - linux/arm64 + #- linux/arm64 steps: - name: Prepare run: | diff --git a/Dockerfile b/Dockerfile index 0288d56..4d2b8be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM rust:1.76.0-slim-bullseye AS chef +FROM rust:1.79.0-slim-bullseye AS chef -RUN apt-get update && apt-get -y --no-install-recommends install git build-essential m4 llvm libclang-dev diffutils curl +RUN apt-get update && apt-get -y --no-install-recommends install git build-essential m4 llvm libclang-dev diffutils curl cmake libglfw3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev python3 RUN cargo install cargo-chef WORKDIR /aiblock ENV CARGO_TARGET_DIR=/aiblock @@ -17,11 +17,11 @@ COPY . . RUN cargo build --release # Use distroless -FROM cgr.dev/chainguard/glibc-dynamic:latest - -# COPY --from=busybox:1.35.0-uclibc /bin/sh /bin/sh - -USER nonroot +#FROM cgr.dev/chainguard/glibc-dynamic:latest +# +FROM rust:1.79.0-slim-bullseye +RUN apt-get update && apt-get -y --no-install-recommends install libclang-dev libxinerama-dev +#USER nonroot # Set these in the environment to override [use once we have env vars available] ARG NODE_TYPE_ARG="mempool" @@ -35,15 +35,15 @@ ENV API_USE_TLS="0" ENV MEMPOOL_MINER_WHITELIST="/etc/mempool_miner_whitelist.json" ENV RUST_LOG=info,debug -# RUN echo "Node type is $NODE_TYPE" - # Copy node bin -COPY --from=builder /aiblock/release/node ./node +COPY --from=builder /aiblock/release/node /aiblock/aiblock +#COPY --from=builder /usr/lib/x86_64-linux-gnu/libX11.so.6 /usr/lib/x86_64-linux-gnu/libX11.so.6 +#RUN cp /aiblock/release/node /aiblock/aiblock # Default config for the node COPY .docker/conf/* /etc/. -ENTRYPOINT ["./node"] +ENTRYPOINT ["/aiblock/aiblock"] CMD [$NODE_TYPE] diff --git a/docker-compose.yml b/docker-compose.yml index 73fcdaf..ed6f580 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,6 +14,7 @@ services: volumes: - /tmp/mempool:/src command: mempool + platform: linux/amd64 networks: aiblock: ipv4_address: 172.28.0.3 @@ -32,6 +33,8 @@ services: miner-node: <<: *node-default + environment: + RUST_LOG: trace depends_on: - mempool-node - storage-node