@@ -12,4 +12,7 @@ RUN apk add --no-cache bitcoin=$BITCOIN_CORE_PACKAGE_VERSION \
VOLUME $DATA_DIR_PATH
USER bitcoin
-CMD ["sh", "-c", "exec bitcoind -datadir=\"$DATA_DIR_PATH\""]
+EXPOSE 8333/tcp
+# json-rpc api
+EXPOSE 8332/tcp
+CMD ["sh", "-c", "exec bitcoind -datadir=\"$DATA_DIR_PATH\" -rpcbind=0.0.0.0 -rpcallowip=172.16.0.0/12"]
@@ -13,6 +13,9 @@ services:
source: data
target: /var/lib/bitcoin
read_only: yes
+ ports:
+ - '8333:8333'
+ - '127.0.0.1:8332:8332'
cap_drop: [ALL]
security_opt: [no-new-privileges]
cpus: 0.5