Cleanup and moved Dockerfiles
Moved lbrycrd Dockerfiles to appropriate subdirectories and removed.
This commit is contained in:
parent
c6b3c09195
commit
8d14acacf9
20 changed files with 0 additions and 272 deletions
|
@ -1,30 +0,0 @@
|
|||
FROM ubuntu:18.04 as prep
|
||||
LABEL MAINTAINER="leopere [at] nixc [dot] us"
|
||||
## TODO: Implement version pinning. `apt-get install curl=<version>`
|
||||
RUN apt-get update && \
|
||||
apt-get -y install unzip curl build-essential && \
|
||||
apt-get autoclean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
COPY stuff/start.sh start
|
||||
COPY stuff/healthcheck.sh healthcheck
|
||||
COPY stuff/fix-permissions.c fix-permissions.c
|
||||
RUN curl -L -o ./lbrycrd-linux.zip $(curl -s https://api.github.com/repos/lbryio/lbrycrd/releases | grep -F 'lbrycrd-linux.zip' | grep download | head -n 1 | cut -d'"' -f4) && \
|
||||
unzip ./lbrycrd-linux.zip && \
|
||||
gcc fix-permissions.c -o fix-permissions && \
|
||||
chmod +x ./lbrycrdd ./lbrycrd-cli ./lbrycrd-tx ./start ./healthcheck ./fix-permissions
|
||||
|
||||
FROM ubuntu:18.04 as app
|
||||
COPY --from=prep /lbrycrdd /lbrycrd-cli /lbrycrd-tx /start /healthcheck /fix-permissions /usr/bin/
|
||||
RUN addgroup --gid 1000 lbrycrd && \
|
||||
adduser lbrycrd --uid 1000 --gid 1000 --gecos GECOS --shell /bin/bash --disabled-password --home /data && \
|
||||
chmod a+s /usr/bin/fix-permissions
|
||||
VOLUME ["/data"]
|
||||
WORKDIR /data
|
||||
## TODO: Implement healthcheck.
|
||||
# HEALTHCHECK ["healthcheck"]
|
||||
EXPOSE 9246 9245
|
||||
|
||||
USER lbrycrd
|
||||
CMD ["start"]
|
|
@ -1,41 +0,0 @@
|
|||
## This base image is for running latest lbrycrdd
|
||||
# For some reason I may switch this image over to Alpine when I can RCA why it won't start.
|
||||
FROM ubuntu:18.04
|
||||
LABEL MAINTAINER="beamer@lbry.io"
|
||||
|
||||
RUN addgroup --gid 1000 lbrycrd && \
|
||||
adduser lbrycrd --uid 1000 --gid 1000 --gecos GECOS --shell /bin/bash --disabled-password --home /data && \
|
||||
apt-get update && \
|
||||
apt-get -y install unzip wget curl && \
|
||||
apt-get autoclean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
## TODO: Consider adding debugpaste or variant
|
||||
# RUN wget -O /usr/bin/debugpaste https://github.com/nixc-us/debugpaste-it/raw/master/bin/debugpaste_64 && \
|
||||
# chmod +x /usr/bin/debugpaste
|
||||
|
||||
RUN wget -O /usr/bin/lbrycrd-linux.zip https://github.com/lbryio/lbrycrd/releases/download/v0.12.4.0/lbrycrd-linux.zip && \
|
||||
cd /usr/bin/ && \
|
||||
unzip lbrycrd-linux.zip && \
|
||||
rm lbrycrd-linux.zip && \
|
||||
chmod +x lbrycrdd lbrycrd-cli lbrycrd-tx
|
||||
|
||||
COPY start.sh /usr/local/bin/start
|
||||
COPY advance_blocks.sh /usr/local/bin/advance
|
||||
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
|
||||
|
||||
# USER lbrycrd
|
||||
# RUN mkdir /data
|
||||
VOLUME ["/data"]
|
||||
WORKDIR /data
|
||||
|
||||
## Exposing daemon port and RPC port
|
||||
EXPOSE 9245 9246
|
||||
|
||||
## TODO: Decide what's important for lbrycrd and possibly add an entrypoint.
|
||||
## Maybe catch things that might match things that can be easily executed in the
|
||||
## lbrycrd cli and if nothing is entered just default to the containers shell.
|
||||
## For now this is a placeholder that executes /bin/bash on `docker exec`
|
||||
# ENTRYPOINT ["docker-entrypoint"]
|
||||
|
||||
CMD ["start"]
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
while true; do
|
||||
lbrycrd-cli -conf=/data/.lbrycrd/lbrycrd.conf generate 1 >> /tmp/output.log
|
||||
sleep 2
|
||||
done
|
|
@ -1,17 +0,0 @@
|
|||
version: '3.4'
|
||||
|
||||
services:
|
||||
#############
|
||||
## Lbrycrd ##
|
||||
#############
|
||||
lbrycrd:
|
||||
image: tiger5226/regtest
|
||||
restart: always
|
||||
labels:
|
||||
- "traefik.expose=true"
|
||||
ports:
|
||||
- "11336:9246"
|
||||
- "11337:11337"
|
||||
## host volumes for persistent data such as wallet private keys.
|
||||
volumes:
|
||||
- "./data:/data"
|
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# default to run whatever the user wanted like "/bin/bash"
|
||||
## If user runs no need to run any more of the entrypoint script.
|
||||
if [[ -z "$@" ]]; then
|
||||
echo "User did not attempt input. Now executing docker-entrypoint."
|
||||
else
|
||||
echo "Running $@."
|
||||
exec "$@"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/bin/bash
|
|
@ -1,34 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ## ToDo: Get a test case to see if this is the first run or a repeat run.
|
||||
# ## If it's a first run you need to do a full index including all transactions
|
||||
# ## tx index creates an index of every single transaction in the block history if
|
||||
# ## not specified it will only create an index for transactions that are related to the wallet or have unspent outputs.
|
||||
# ## This is specific to chainquery.
|
||||
|
||||
## Ensure perms are correct prior to running main binary
|
||||
mkdir -p /data/.lbrycrd
|
||||
chown -R lbrycrd:lbrycrd /data
|
||||
chmod -R 755 /data/
|
||||
|
||||
## TODO: Consider a config directory for future magic.
|
||||
# chown -R 1000:1000 /etc/lbrycrd
|
||||
# chmod -R 755 /etc/lbrycrd
|
||||
rm -f /var/run/lbrycrd.pid
|
||||
|
||||
|
||||
## Set config params
|
||||
## TODO: Make this more automagic in the future.
|
||||
echo "rpcuser=lbry" > /data/.lbrycrd/lbrycrd.conf
|
||||
echo "rpcpassword=lbry" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "rpcport=11337" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "rpcbind=0.0.0.0" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "rpcallowip=0.0.0.0/0" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "regtest=1" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "txindex=1" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "server=1" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "printtoconsole=1" >> /data/.lbrycrd/lbrycrd.conf
|
||||
|
||||
#nohup advance &>/dev/null &
|
||||
su -c "lbrycrdd -conf=/data/.lbrycrd/lbrycrd.conf" lbrycrd
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
docker build -t tiger5226/regtest:latest .
|
||||
docker push tiger5226/regtest:latest
|
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# default to run whatever the user wanted like "/bin/bash"
|
||||
## If user runs no need to run any more of the entrypoint script.
|
||||
if [[ -z "$@" ]]; then
|
||||
echo "User did not attempt input. Now executing docker-entrypoint."
|
||||
else
|
||||
echo "Running $@."
|
||||
exec "$@"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/bin/bash
|
|
@ -1,40 +0,0 @@
|
|||
## This base image is for running latest lbrycrdd
|
||||
# For some reason I may switch this image over to Alpine when I can RCA why it won't start.
|
||||
FROM ubuntu:18.04
|
||||
LABEL MAINTAINER="leopere [at] nixc [dot] us"
|
||||
|
||||
RUN addgroup --gid 1000 lbrycrd && \
|
||||
adduser lbrycrd --uid 1000 --gid 1000 --gecos GECOS --shell /bin/bash --disabled-password --home /data && \
|
||||
apt-get update && \
|
||||
apt-get -y install unzip wget curl && \
|
||||
apt-get autoclean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
## TODO: Consider adding debugpaste or variant
|
||||
# RUN wget -O /usr/bin/debugpaste https://github.com/nixc-us/debugpaste-it/raw/master/bin/debugpaste_64 && \
|
||||
# chmod +x /usr/bin/debugpaste
|
||||
|
||||
RUN wget -O /usr/bin/lbrycrd-linux.zip https://github.com/lbryio/lbrycrd/releases/download/v0.12.3.1/lbrycrd-linux.zip && \
|
||||
cd /usr/bin/ && \
|
||||
unzip lbrycrd-linux.zip && \
|
||||
rm lbrycrd-linux.zip && \
|
||||
chmod +x lbrycrdd lbrycrd-cli lbrycrd-tx
|
||||
|
||||
COPY start.sh /usr/local/bin/start
|
||||
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
|
||||
|
||||
# USER lbrycrd
|
||||
# RUN mkdir /data
|
||||
VOLUME ["/data"]
|
||||
WORKDIR /data
|
||||
|
||||
## Exposing daemon port and RPC port
|
||||
EXPOSE 9245 9246
|
||||
|
||||
## TODO: Decide what's important for lbrycrd and possibly add an entrypoint.
|
||||
## Maybe catch things that might match things that can be easily executed in the
|
||||
## lbrycrd cli and if nothing is entered just default to the containers shell.
|
||||
## For now this is a placeholder that executes /bin/bash on `docker exec`
|
||||
# ENTRYPOINT ["docker-entrypoint"]
|
||||
|
||||
CMD ["start"]
|
|
@ -1,7 +0,0 @@
|
|||
To run a local instance of testnet via docker:
|
||||
|
||||
1) clone this repository
|
||||
|
||||
2) Run `cd ./lbrycrd/testnet`
|
||||
|
||||
3) Run `docker-compose up -d`
|
|
@ -1,17 +0,0 @@
|
|||
version: '3.4'
|
||||
|
||||
services:
|
||||
#############
|
||||
## Lbrycrd ##
|
||||
#############
|
||||
lbrycrd:
|
||||
image: tiger5226/testnet
|
||||
restart: always
|
||||
labels:
|
||||
- "traefik.expose=true"
|
||||
ports:
|
||||
- "11336:9246"
|
||||
- "11337:11337"
|
||||
## host volumes for persistent data such as wallet private keys.
|
||||
volumes:
|
||||
- "./data:/data"
|
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# default to run whatever the user wanted like "/bin/bash"
|
||||
## If user runs no need to run any more of the entrypoint script.
|
||||
if [[ -z "$@" ]]; then
|
||||
echo "User did not attempt input. Now executing docker-entrypoint."
|
||||
else
|
||||
echo "Running $@."
|
||||
exec "$@"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/bin/bash
|
|
@ -1,34 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ## ToDo: Get a test case to see if this is the first run or a repeat run.
|
||||
# ## If it's a first run you need to do a full index including all transactions
|
||||
# ## tx index creates an index of every single transaction in the block history if
|
||||
# ## not specified it will only create an index for transactions that are related to the wallet or have unspent outputs.
|
||||
# ## This is specific to chainquery.
|
||||
|
||||
## Ensure perms are correct prior to running main binary
|
||||
mkdir -p /data/.lbrycrd
|
||||
chown -R lbrycrd:lbrycrd /data
|
||||
chmod -R 755 /data/
|
||||
|
||||
## TODO: Consider a config directory for future magic.
|
||||
# chown -R 1000:1000 /etc/lbrycrd
|
||||
# chmod -R 755 /etc/lbrycrd
|
||||
rm -f /var/run/lbrycrd.pid
|
||||
|
||||
|
||||
## Set config params
|
||||
## TODO: Make this more automagic in the future.
|
||||
echo "rpcuser=lbry" > /data/.lbrycrd/lbrycrd.conf
|
||||
echo "rpcpassword=lbry" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "rpcport=11337" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "rpcbind=0.0.0.0" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "rpcallowip=0.0.0.0/0" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "testnet=1" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "txindex=1" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "server=1" >> /data/.lbrycrd/lbrycrd.conf
|
||||
echo "printtoconsole=1" >> /data/.lbrycrd/lbrycrd.conf
|
||||
|
||||
#nohup advance &>/dev/null &
|
||||
su -c "lbrycrdd -conf=/data/.lbrycrd/lbrycrd.conf" lbrycrd
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
docker build -t tiger5226/testnet:latest .
|
||||
docker push tiger5226/testnet:latest
|
Loading…
Add table
Reference in a new issue