2019-12-08 05:38:54 +01:00
|
|
|
FROM ubuntu:19.10
|
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
|
|
|
|
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-08 05:38:54 +01:00
|
|
|
build-essential \
|
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
python3-pip \
|
|
|
|
python3-wheel \
|
|
|
|
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
|
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 BANDWIDTH_LIMIT=1000000000000000000000000000000000000000000
|
|
|
|
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"]
|