2022-01-19 16:57:00 +01:00
|
|
|
# FROM debian:10-slim
|
|
|
|
FROM python:3.7.12-slim-buster
|
|
|
|
|
|
|
|
ARG user=lbry
|
|
|
|
ARG db_dir=/database
|
|
|
|
ARG projects_dir=/home/$user
|
|
|
|
|
|
|
|
ARG DOCKER_TAG
|
|
|
|
ARG DOCKER_COMMIT=docker
|
|
|
|
ENV DOCKER_TAG=$DOCKER_TAG DOCKER_COMMIT=$DOCKER_COMMIT
|
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get -y --no-install-recommends install \
|
|
|
|
wget \
|
|
|
|
tar unzip \
|
|
|
|
build-essential \
|
|
|
|
automake libtool \
|
2022-01-21 21:55:07 +01:00
|
|
|
pkg-config
|
|
|
|
|
2022-01-19 16:57:00 +01:00
|
|
|
RUN pip install uvloop
|
|
|
|
RUN groupadd -g 999 $user && useradd -m -u 999 -g $user $user
|
|
|
|
RUN mkdir -p $db_dir
|
|
|
|
RUN chown -R $user:$user $db_dir
|
|
|
|
|
|
|
|
COPY . $projects_dir
|
|
|
|
RUN chown -R $user:$user $projects_dir
|
|
|
|
|
|
|
|
USER $user
|
|
|
|
WORKDIR $projects_dir
|
|
|
|
|
|
|
|
RUN make install
|
|
|
|
RUN python3 docker/set_build.py
|
|
|
|
RUN rm ~/.cache -rf
|
|
|
|
|
|
|
|
# entry point
|
|
|
|
ARG host=0.0.0.0
|
|
|
|
ARG tcp_port=50001
|
|
|
|
ARG daemon_url=http://lbry:lbry@192.99.151.178:9245/
|
|
|
|
VOLUME $db_dir
|
|
|
|
ENV TCP_PORT=$tcp_port
|
|
|
|
ENV HOST=$host
|
|
|
|
ENV DAEMON_URL=$daemon_url
|
|
|
|
ENV DB_DIRECTORY=$db_dir
|
|
|
|
ENV MAX_SESSIONS=1000000000
|
|
|
|
ENV MAX_SEND=1000000000000000000
|
|
|
|
ENV EVENT_LOOP_POLICY=uvloop
|
|
|
|
COPY ./docker/wallet_server_entrypoint.sh /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|