Add bashrc file as an alais for interactive shell
This commit is contained in:
parent
80680e5556
commit
18333d9140
11
.bashrc
Normal file
11
.bashrc
Normal file
@ -0,0 +1,11 @@
|
||||
# Use bash completion, if available
|
||||
alais bitcoin-cli="bitcoin-cli -datadir=/root/signet-custom"
|
||||
|
||||
# Check if an interactive shell is running
|
||||
if [ -n "$PS1" ]; then
|
||||
# Source bash completion, if its available
|
||||
if [ -f /usr/share/bash-completion/bash_completion]; then
|
||||
./usr/share/bash-completion/bash_completion
|
||||
|
||||
fi
|
||||
fi
|
||||
@ -29,6 +29,9 @@ COPY bitcoin.conf /root/.bitcoin/bitcoin.conf
|
||||
COPY --from=0 /bitcoin/contrib/signet/miner.py /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/miner.py
|
||||
|
||||
# Copy the .bashrc file to the container's root directory
|
||||
COPY .bashrc /root/.bashrc
|
||||
|
||||
# Copy the logtail.sh script
|
||||
COPY logtail.sh .
|
||||
RUN chmod +x logtail.sh
|
||||
|
||||
12
logtail.sh
Normal file
12
logtail.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -Eeuo pipefail
|
||||
|
||||
# Define the path to your Bitcoin data directory
|
||||
DATADIR="/root/signet-custom"
|
||||
|
||||
# Ensure the debug.log file exists
|
||||
touch $DATADIR/debug.log
|
||||
|
||||
# Show and Tail Bitcoin debug log
|
||||
tail -n +1 -f $DATADIR/debug.log || true
|
||||
echo "Tailing the Bitcoin debug log. press Ctrl+c to stop."
|
||||
Loading…
x
Reference in New Issue
Block a user