-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
77 lines (61 loc) · 2.24 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM horologger/btcshell:v0.0.3 AS builder
LABEL maintainer="horologger <[email protected]>"
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "Spaces Build Starting...$TARGETPLATFORM"
# RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"
ARG PG_ENABLE
# docker buildx build --platform linux/arm64,linux/amd64 --tag horologger/spaces:v0.0.3 --output "type=registry" . --build-arg POSTGRESQL_ENABLE=true
RUN if [ "$PG_ENABLE" = "true" ] ; then \
echo "PG ENABLED"; \
else \
echo "PG DISABLED"; \
fi
# Start9 Packaging
RUN apk add --no-cache yq cargo pkgconfig openssh openssl openssl-dev openssl-libs-static gcompat git; \
rm -f /var/cache/apk/*
RUN if [ "$PG_ENABLE" = "true" ] ; then \
apk add npm postgresql; rm -f /var/cache/apk/*; \
fi
# RUN git clone https://github.com/spacesprotocol/spaced && cd spaced ; \
RUN git clone https://github.com/horologger/spaced && cd spaced ; \
cargo build --release ; \
cargo install --path node --locked ; cd ..
# echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
# Get the Spaces Explorer code but don't do anthing yet.
# RUN git clone https://github.com/horologger/spaces-explorer
# Install Fabric
# RUN npm install -g @spacesprotocol/fabric
# libgc++ g++ clang make rustup
# apk add clang make libgc++ g++
# https://www.rust-lang.org/tools/install
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# cargo install cargo-risczero
# cargo risczero install
# RUN git clone https://github.com/andrewlunde/subspacer && cd subspacer ; \
# cargo build --release ; \
# cargo install --path node --locked
# Final stage
FROM horologger/btcshell:v0.0.3
# Required runtime dependencies based on docker_entrypoint.sh usage
RUN apk add --no-cache \
yq \
openssl \
openssl-libs-static \
gcompat \
screen \
htop \
bash \
miller \
nodejs \
npm \
&& rm -f /var/cache/apk/*
# Copy built binaries from builder stage
COPY --from=builder /root/.cargo/bin/spaced /root/.cargo/bin/spaced
COPY --from=builder /root/.cargo/bin/space-cli /root/.cargo/bin/space-cli
COPY --chmod=755 docker_entrypoint.sh /usr/local/bin/
EXPOSE 22253
EXPOSE 5173
EXPOSE 3000
# Run docker_entrypoint.sh
ENTRYPOINT ["/usr/local/bin/docker_entrypoint.sh"]