15
15
# Set up Rust environment
16
16
ENV RUST_BACKTRACE=1
17
17
18
- RUN apt-get update && \
19
- apt-get install -y curl build-essential protobuf-compiler clang git pkg-config libssl-dev llvm libudev-dev
20
- #RUN rm -rf /var/lib/apt/lists/*
18
+ RUN apt-get update
19
+ RUN apt-get install -y curl build-essential protobuf-compiler clang git pkg-config libssl-dev llvm libudev-dev
21
20
22
21
# Copy entire repository
23
22
COPY . /build
@@ -32,34 +31,35 @@ RUN rustup target add wasm32-unknown-unknown
32
31
## Build fast-blocks node
33
32
RUN ./scripts/localnet.sh --build-only
34
33
# Build non-fast-blocks
35
- # RUN ./scripts/localnet.sh False --build-only
34
+ RUN ./scripts/localnet.sh False --build-only
36
35
37
36
# Verify the binaries was produced
38
37
RUN test -e /build/target/fast-blocks/release/node-subtensor
39
- #RUN test -e /build/target/non-fast-blocks/release/node-subtensor
40
-
41
- EXPOSE 30333 9933 9944 9945
38
+ RUN test -e /build/target/non-fast-blocks/release/node-subtensor
42
39
43
40
FROM $BASE_IMAGE AS subtensor-localnet
44
41
45
42
# Copy binaries
46
43
COPY --from=builder /build/target/fast-blocks/release/node-subtensor target/fast-blocks/release/node-subtensor
47
44
RUN chmod +x target/fast-blocks/release/node-subtensor
48
45
49
- # COPY --from=builder /build/target/non-fast-blocks/release/node-subtensor target/non-fast-blocks/release/node-subtensor
50
- # RUN chmod +x target/non-fast-blocks/release/node-subtensor
46
+ COPY --from=builder /build/target/non-fast-blocks/release/node-subtensor target/non-fast-blocks/release/node-subtensor
47
+ RUN chmod +x target/non-fast-blocks/release/node-subtensor
51
48
52
49
COPY --from=builder /build/snapshot.json /snapshot.json
53
50
54
51
COPY --from=builder /build/scripts/localnet.sh scripts/localnet.sh
55
52
RUN chmod +x /scripts/localnet.sh
56
53
57
- # Ubdate certificates
58
- RUN apt install ca-certificates
59
- RUN update-ca-certificates
54
+ ## Ubdate certificates
55
+ RUN apt-get update && apt-get install -y ca-certificates
60
56
61
57
# Do not build (just run)
62
58
ENV BUILD_BINARY=0
59
+ # Switch to local run with IP 0.0.0.0 within docker image
60
+ ENV RUN_IN_DOCKER=1
61
+ # Expose ports
62
+ EXPOSE 30334 30335 9944 9945
63
63
64
64
ENTRYPOINT ["/scripts/localnet.sh"]
65
- CMD ["True"]
65
+ CMD ["True"]
0 commit comments