Skip to content

Instantly share code, notes, and snippets.

@CristianMG
Last active November 27, 2021 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CristianMG/dc4d5f284c2770b5afc34ab6ce7e745f to your computer and use it in GitHub Desktop.
Save CristianMG/dc4d5f284c2770b5afc34ab6ce7e745f to your computer and use it in GitHub Desktop.
FROM ubuntu
# Set Workdir
RUN mkdir /home/haveno
WORKDIR /home/haveno
# Copy all context required
RUN mkdir scripts
# Copy usefull scripts to current work directory
COPY ./scripts/install_java.sh scripts/
COPY ./scripts/install_java.bat scripts/
COPY ./scripts/wait_bitcoin_node.sh scripts/
COPY ./scripts/xmr_btc_deps.sh scripts/
COPY Makefile .
# Create a volume to save all dev stages data
VOLUME [ ".localnet" ]
# Updating all dependencys
RUN apt-get update
# It's to avoid tzdata prompts the interactive console and breaks the image
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata
# Install dependencies
RUN apt-get install make wget git git-lfs openjdk-11-jdk -y
# Running initial commands download bitcoin node and monero
RUN make localnet
RUN make nodes
RUN echo | ls -la .localnet
RUN echo | ls -la
# When a container starting with this image execute btc-blocks
EXPOSE 18333
EXPOSE 18443
EXPOSE 8333
RUN mkdir bitcoind
RUN make bitcoind & >> ./bitcoind/bitcoind-log
#RUN make bitcoind & >> ./bitcoind/bitcoind-log
# Listing scripts and .localnet for debug
RUN echo | ls -la scripts
RUN echo | ls -la .localnet
RUN ./scripts/wait_bitcoin_node.sh
RUN make btc-blocks
## For mining in the future ENTRYPOINT "make btc-blocks" && /bin/bash
#exemple ENTRYPOINT service nginx start && service ssh start && /bin/bash "use && to separate your code"
CMD [ "make monero-shared" ]
# Delete all containers
# docker rm $(docker ps -a -q)
# Delete all images add force if you have problems with delete
# docker rmi $(docker images -a -q)
# Build the images
# docker build -t haveno .
# Prune volumes
# docker volume prune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment