2021-02-13 06:14:52 +01:00
|
|
|
FROM debian:10-slim
|
2018-12-28 21:19:11 +01:00
|
|
|
|
|
|
|
ARG user=lbry
|
2019-12-08 05:38:54 +01:00
|
|
|
ARG db_dir=/database
|
|
|
|
ARG projects_dir=/home/$user
|
2018-12-28 21:19:11 +01:00
|
|
|
|
2020-01-23 18:38:33 +01:00
|
|
|
ARG DOCKER_TAG
|
|
|
|
ARG DOCKER_COMMIT=docker
|
|
|
|
ENV DOCKER_TAG=$DOCKER_TAG DOCKER_COMMIT=$DOCKER_COMMIT
|
|
|
|
|
2019-11-21 20:16:10 +01:00
|
|
|
RUN apt-get update && \
|
2019-12-08 05:38:54 +01:00
|
|
|
apt-get -y --no-install-recommends install \
|
2019-12-11 19:08:02 +01:00
|
|
|
wget \
|
2019-12-21 20:39:04 +01:00
|
|
|
tar unzip \
|
2019-12-08 05:38:54 +01:00
|
|
|
build-essential \
|
2021-07-15 22:07:47 +02:00
|
|
|
automake libtool \
|
2021-02-12 01:45:41 +01:00
|
|
|
pkg-config \
|
|
|
|
libleveldb-dev \
|
2021-02-13 06:14:52 +01:00
|
|
|
python3.7 \
|
2019-12-08 05:38:54 +01:00
|
|
|
python3-dev \
|
|
|
|
python3-pip \
|
|
|
|
python3-wheel \
|
2021-10-20 00:16:56 +02:00
|
|
|
python3-cffi \
|
2019-12-08 05:38:54 +01:00
|
|
|
python3-setuptools && \
|
|
|
|
update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1 && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
RUN groupadd -g 999 $user && useradd -m -u 999 -g $user $user
|
2018-12-28 21:19:11 +01:00
|
|
|
RUN mkdir -p $db_dir
|
|
|
|
RUN chown -R $user:$user $db_dir
|
|
|
|
|
2019-06-21 00:21:48 +02:00
|
|
|
COPY . $projects_dir
|
2019-12-08 05:38:54 +01:00
|
|
|
RUN chown -R $user:$user $projects_dir
|
|
|
|
|
2018-12-28 21:19:11 +01:00
|
|
|
USER $user
|
2019-12-08 05:38:54 +01:00
|
|
|
WORKDIR $projects_dir
|
2019-06-21 00:21:48 +02:00
|
|
|
|
2019-12-08 05:38:54 +01:00
|
|
|
RUN pip install uvloop
|
|
|
|
RUN make install
|
2020-01-23 18:38:33 +01:00
|
|
|
RUN python3 docker/set_build.py
|
2019-06-21 00:21:48 +02:00
|
|
|
RUN rm ~/.cache -rf
|
2018-12-28 21:19:11 +01:00
|
|
|
|
|
|
|
# entry point
|
|
|
|
ARG host=0.0.0.0
|
|
|
|
ARG tcp_port=50001
|
|
|
|
ARG daemon_url=http://lbry:lbry@localhost: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
|
2019-04-25 22:05:30 +02:00
|
|
|
ENV EVENT_LOOP_POLICY=uvloop
|
2019-11-21 20:16:10 +01:00
|
|
|
COPY ./docker/wallet_server_entrypoint.sh /entrypoint.sh
|
2019-09-16 15:51:22 +02:00
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|