-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add docker-compose file #6544
add docker-compose file #6544
Changes from all commits
02f4182
accb037
6bbc5be
d3ff5a2
5a77432
4a93e3b
6c6df04
ab02ca7
f68b43a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ WORKDIR /opt/filecoin | |
ARG RUSTFLAGS="" | ||
ARG GOFLAGS="" | ||
|
||
RUN make deps lotus lotus-miner lotus-worker lotus-shed lotus-chainwatch lotus-stats | ||
RUN make lotus lotus-miner lotus-worker lotus-shed lotus-wallet lotus-gateway | ||
|
||
|
||
FROM ubuntu:20.04 AS base | ||
|
@@ -56,19 +56,173 @@ COPY --from=builder /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 /lib/ | |
RUN useradd -r -u 532 -U fc | ||
|
||
|
||
### | ||
FROM base AS lotus | ||
MAINTAINER Lotus Development Team | ||
|
||
COPY --from=builder /opt/filecoin/lotus /usr/local/bin/ | ||
COPY --from=builder /opt/filecoin/lotus /usr/local/bin/ | ||
COPY --from=builder /opt/filecoin/lotus-shed /usr/local/bin/ | ||
COPY scripts/docker-lotus-entrypoint.sh / | ||
|
||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters | ||
ENV LOTUS_PATH /var/lib/lotus | ||
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1 | ||
ENV LOTUS_JAEGER_AGENT_PORT 6831 | ||
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car | ||
ENV DOCKER_LOTUS_IMPORT_WALLET "" | ||
|
||
RUN mkdir /var/lib/lotus /var/tmp/filecoin-proof-parameters | ||
RUN chown fc: /var/lib/lotus /var/tmp/filecoin-proof-parameters | ||
|
||
VOLUME /var/lib/lotus | ||
VOLUME /var/tmp/filecoin-proof-parameters | ||
|
||
USER fc | ||
|
||
EXPOSE 1234 | ||
|
||
ENTRYPOINT ["/docker-lotus-entrypoint.sh"] | ||
|
||
CMD ["-help"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It only does because it exec's to lotus at the end. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh nice |
||
|
||
### | ||
FROM base AS lotus-wallet | ||
MAINTAINER Lotus Development Team | ||
|
||
COPY --from=builder /opt/filecoin/lotus-wallet /usr/local/bin/ | ||
|
||
RUN mkdir /var/lib/lotus /var/tmp/filecoin-proof-parameters && chown fc /var/lib/lotus /var/tmp/filecoin-proof-parameters | ||
ENV WALLET_PATH /var/lib/lotus-wallet | ||
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1 | ||
ENV LOTUS_JAEGER_AGENT_PORT 6831 | ||
|
||
RUN mkdir /var/lib/lotus-wallet | ||
RUN chown fc: /var/lib/lotus-wallet | ||
|
||
VOLUME /var/lib/lotus-wallet | ||
|
||
USER fc | ||
|
||
ENTRYPOINT ["/usr/local/bin/lotus"] | ||
EXPOSE 1777 | ||
|
||
ENTRYPOINT ["/usr/local/bin/lotus-wallet"] | ||
|
||
CMD ["-help"] | ||
|
||
### | ||
FROM base AS lotus-gateway | ||
MAINTAINER Lotus Development Team | ||
|
||
COPY --from=builder /opt/filecoin/lotus-gateway /usr/local/bin/ | ||
|
||
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1 | ||
ENV LOTUS_JAEGER_AGENT_PORT 6831 | ||
ENV FULLNODE_API_INFO /ip4/127.0.0.1/tcp/1234/http | ||
|
||
USER fc | ||
|
||
EXPOSE 1234 | ||
|
||
ENTRYPOINT ["/usr/local/bin/lotus-gateway"] | ||
|
||
CMD ["-help"] | ||
|
||
|
||
### | ||
FROM base AS lotus-miner | ||
MAINTAINER Lotus Development Team | ||
|
||
COPY --from=builder /opt/filecoin/lotus-miner /usr/local/bin/ | ||
COPY scripts/docker-lotus-miner-entrypoint.sh / | ||
|
||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters | ||
ENV FULLNODE_API_INFO /ip4/127.0.0.1/tcp/1234/http | ||
ENV LOTUS_MINER_PATH /var/lib/lotus-miner | ||
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1 | ||
ENV LOTUS_JAEGER_AGENT_PORT 6831 | ||
ENV DOCKER_LOTUS_MINER_INIT true | ||
|
||
RUN mkdir /var/lib/lotus-miner /var/tmp/filecoin-proof-parameters | ||
RUN chown fc: /var/lib/lotus-miner /var/tmp/filecoin-proof-parameters | ||
|
||
VOLUME /var/lib/lotus-miner | ||
VOLUME /var/tmp/filecoin-proof-parameters | ||
|
||
USER fc | ||
|
||
EXPOSE 2345 | ||
|
||
ENTRYPOINT ["/docker-lotus-miner-entrypoint.sh"] | ||
|
||
CMD ["-help"] | ||
|
||
|
||
### | ||
FROM base AS lotus-worker | ||
MAINTAINER Lotus Development Team | ||
|
||
COPY --from=builder /opt/filecoin/lotus-worker /usr/local/bin/ | ||
|
||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters | ||
ENV MINER_API_INFO /ip4/127.0.0.1/tcp/2345/http | ||
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker | ||
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1 | ||
ENV LOTUS_JAEGER_AGENT_PORT 6831 | ||
|
||
RUN mkdir /var/lib/lotus-worker | ||
RUN chown fc: /var/lib/lotus-worker | ||
|
||
VOLUME /var/lib/lotus-worker | ||
|
||
USER fc | ||
|
||
EXPOSE 3456 | ||
|
||
ENTRYPOINT ["/usr/local/bin/lotus-worker"] | ||
|
||
CMD ["-help"] | ||
|
||
|
||
### | ||
from base as lotus-all-in-one | ||
|
||
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters | ||
ENV FULLNODE_API_INFO /ip4/127.0.0.1/tcp/1234/http | ||
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1 | ||
ENV LOTUS_JAEGER_AGENT_PORT 6831 | ||
ENV LOTUS_MINER_PATH /var/lib/lotus-miner | ||
ENV LOTUS_PATH /var/lib/lotus | ||
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker | ||
ENV MINER_API_INFO /ip4/127.0.0.1/tcp/2345/http | ||
ENV WALLET_PATH /var/lib/lotus-wallet | ||
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car | ||
ENV DOCKER_LOTUS_MINER_INIT true | ||
|
||
COPY --from=builder /opt/filecoin/lotus /usr/local/bin/ | ||
COPY --from=builder /opt/filecoin/lotus-shed /usr/local/bin/ | ||
COPY --from=builder /opt/filecoin/lotus-wallet /usr/local/bin/ | ||
COPY --from=builder /opt/filecoin/lotus-gateway /usr/local/bin/ | ||
COPY --from=builder /opt/filecoin/lotus-miner /usr/local/bin/ | ||
COPY --from=builder /opt/filecoin/lotus-worker /usr/local/bin/ | ||
|
||
RUN mkdir /var/tmp/filecoin-proof-parameters | ||
RUN mkdir /var/lib/lotus | ||
RUN mkdir /var/lib/lotus-miner | ||
RUN mkdir /var/lib/lotus-worker | ||
RUN mkdir /var/lib/lotus-wallet | ||
RUN chown fc: /var/tmp/filecoin-proof-parameters | ||
RUN chown fc: /var/lib/lotus | ||
RUN chown fc: /var/lib/lotus-miner | ||
RUN chown fc: /var/lib/lotus-worker | ||
RUN chown fc: /var/lib/lotus-wallet | ||
|
||
|
||
VOLUME /var/tmp/filecoin-proof-parameters | ||
VOLUME /var/lib/lotus | ||
VOLUME /var/lib/lotus-miner | ||
VOLUME /var/lib/lotus-worker | ||
VOLUME /var/lib/lotus-wallet | ||
|
||
EXPOSE 1234 | ||
EXPOSE 2345 | ||
EXPOSE 3456 | ||
EXPOSE 1777 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should keep lotus-shed, it's really useful