From ffd2888acd34c26964e5d00f2aa438858b113a91 Mon Sep 17 00:00:00 2001 From: Ben Sigman Date: Thu, 16 Nov 2023 17:02:19 -0800 Subject: [PATCH 1/5] add Dockerfile and docker-compose.yml --- Dockerfile | 15 +++++++++++++++ docker-compose.yml | 22 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..3beb7e8300 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# Ubuntu latest +FROM ubuntu:latest +# Update packages +RUN apt-get update && apt-get upgrade -y +RUN apt install curl -y +# use the mounted ordinals directory from the host +WORKDIR /ordinals +# Install latest ord release from github +RUN curl -Ls -o install.sh https://raw.githubusercontent.com/ordinals/ord/master/install.sh +# Make executable +RUN chmod 755 install.sh +# Install to /ordinals inside docker container +RUN ./install.sh --to /ordinals +# Set entrypoint to ord with env vars set in docker-compose.yml +ENTRYPOINT /ordinals/ord --data-dir $DATA_DIR --rpc-url $RPC_HOST:$RPC_PORT --cookie-file $COOKIE_FILE server --http --http-port $HTTP_PORT diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000..ca5d0e2ffa --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' +services: + ord: + image: ord + container_name: ord + build: + context: . + dockerfile: Dockerfile + volumes: + - /ordinals:/ordinals:rw + - ~/.bitcoin:/root/.bitcoin + environment: + RPC_HOST: "127.0.0.1" + RPC_PORT: "8332" + COOKIE_FILE: "/root/.bitcoin/.cookie" + DATA_DIR: "/ordinals/index-data" + HTTP_PORT: "8080" + RUST_LOG: "INFO" + RUST_BACKTRACE: "FULL" + network_mode: host + expose: + - "8080" \ No newline at end of file From 9b5451b450618eac4096ed11f9dcf81af4c0180a Mon Sep 17 00:00:00 2001 From: Ben Sigman Date: Fri, 17 Nov 2023 08:00:09 -0800 Subject: [PATCH 2/5] add paths for each OS type to docker-compose --- docker-compose.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index ca5d0e2ffa..e2aec93e2d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,11 @@ services: context: . dockerfile: Dockerfile volumes: - - /ordinals:/ordinals:rw +# You can use any of these paths to store the index data on your host machine (or any other path you like) +# Default paths for each os are listed below + - ~/.local/share/ord:/ordinals:rw # linux +# - /roaming/ord:/ordinals:rw # windows +# - ~/Library/Application Support/ord:/ordinals:rw - ~/.bitcoin:/root/.bitcoin environment: RPC_HOST: "127.0.0.1" From dcf6b95fbd4cd63428c4f8116d9272c2d08913e5 Mon Sep 17 00:00:00 2001 From: Ben Sigman Date: Fri, 17 Nov 2023 08:40:10 -0800 Subject: [PATCH 3/5] update comments in docker-compose --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e2aec93e2d..4212de3b0a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,10 +8,10 @@ services: dockerfile: Dockerfile volumes: # You can use any of these paths to store the index data on your host machine (or any other path you like) -# Default paths for each os are listed below +# Default paths for each os are listed below - just comment / uncomment as needed - ~/.local/share/ord:/ordinals:rw # linux # - /roaming/ord:/ordinals:rw # windows -# - ~/Library/Application Support/ord:/ordinals:rw +# - ~/Library/Application Support/ord:/ordinals:rw # OS X - ~/.bitcoin:/root/.bitcoin environment: RPC_HOST: "127.0.0.1" From c66e50dd8812ffef5332eff3d4bc6352ed3a7dc1 Mon Sep 17 00:00:00 2001 From: Ben Sigman Date: Fri, 17 Nov 2023 08:40:22 -0800 Subject: [PATCH 4/5] update comments in docker-compose --- docker-compose.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4212de3b0a..96e76e7165 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,10 +9,10 @@ services: volumes: # You can use any of these paths to store the index data on your host machine (or any other path you like) # Default paths for each os are listed below - just comment / uncomment as needed - - ~/.local/share/ord:/ordinals:rw # linux -# - /roaming/ord:/ordinals:rw # windows -# - ~/Library/Application Support/ord:/ordinals:rw # OS X - - ~/.bitcoin:/root/.bitcoin + - ~/.local/share/ord:/ordinals:rw # Linux +# - /roaming/ord:/ordinals:rw # Windows +# - ~/Library/Application Support/ord:/ordinals:rw # Mac OSX + - ~/.bitcoin:/root/.bitcoin # this may vary depending on your bitcoin.conf environment: RPC_HOST: "127.0.0.1" RPC_PORT: "8332" From 13fcee7c40ab2c6ecb491b20011d9de713f9c82d Mon Sep 17 00:00:00 2001 From: Ben Sigman Date: Thu, 30 Nov 2023 16:36:23 -0800 Subject: [PATCH 5/5] update Dockerfile --- Dockerfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3beb7e8300..31b6f2b0e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,11 @@ FROM ubuntu:latest # Update packages RUN apt-get update && apt-get upgrade -y RUN apt install curl -y -# use the mounted ordinals directory from the host -WORKDIR /ordinals -# Install latest ord release from github +WORKDIR ~/bin +# Install latest ord release from github RUN curl -Ls -o install.sh https://raw.githubusercontent.com/ordinals/ord/master/install.sh # Make executable -RUN chmod 755 install.sh -# Install to /ordinals inside docker container -RUN ./install.sh --to /ordinals +RUN chmod +x install.sh +RUN ./install.sh # Set entrypoint to ord with env vars set in docker-compose.yml -ENTRYPOINT /ordinals/ord --data-dir $DATA_DIR --rpc-url $RPC_HOST:$RPC_PORT --cookie-file $COOKIE_FILE server --http --http-port $HTTP_PORT +ENTRYPOINT ~/bin/ord --data-dir $DATA_DIR --rpc-url $RPC_HOST:$RPC_PORT --cookie-file $COOKIE_FILE server --http --http-port $HTTP_PORT \ No newline at end of file