-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
46 lines (37 loc) · 1.04 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM python:3.7
LABEL version="0.4.0"
LABEL maintainer="Alex Olieman <[email protected]>"
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update \
&& apt-get install -y \
libsnappy-dev \
zlib1g-dev \
libbz2-dev \
libgflags-dev \
liblz4-dev \
libzstd-dev \
&& apt-get clean
ENV BUILD_DIR=/build
WORKDIR ${BUILD_DIR}
COPY download_rocksdb.py ./
RUN ROCKS_VERSION=$(python download_rocksdb.py ${BUILD_DIR}) \
&& tar -xzf "${BUILD_DIR}/latest.tar.gz" \
&& cd "rocksdb-$ROCKS_VERSION" \
&& INSTALL_PATH=/usr make install-shared \
&& rm -rf ${BUILD_DIR}
ENV APP_DIR=/usr/src/app
WORKDIR ${APP_DIR}
# to avoid pip cache, this needs to be falsy
ENV PIP_NO_CACHE_DIR=false
COPY Pipfile ./
COPY Pipfile.lock ./
RUN pip install Cython pipenv
RUN pipenv install --system
COPY gunicorn_config.py ./
RUN mkdir same_thing
COPY ./same_thing ./same_thing
ENV PATH="${APP_DIR}:${PATH}"
RUN mkdir /dbdata
RUN mkdir /downloads
VOLUME [ "/dbdata", "/downloads" ]
CMD [ "python", "-m", "same_thing.loader" ]