-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathDockerfile
34 lines (27 loc) · 1.1 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
FROM alpine:3.11
MAINTAINER Taivo Käsper <taivo.kasper@gmail.com>
ENV OMNIDB_VERSION 3.0.3b
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
RUN apk add --no-cache --virtual .build-deps curl unzip g++ python3-dev \
&& apk add --no-cache make wget llvm \
&& apk add --no-cache --update python3 \
&& pip3 install --upgrade pip \
&& apk add postgresql-dev libffi-dev openldap-dev \
&& pip3 install psycopg2 \
&& pip3 install cffi \
&& curl -Lo /tmp/OmniDB.zip https://github.com/OmniDB/OmniDB/archive/${OMNIDB_VERSION}.zip \
&& unzip /tmp/OmniDB.zip -d /opt/ \
&& rm -f /tmp/OmniDB.zip \
&& mkdir /etc/omnidb \
&& cd /opt/OmniDB-${OMNIDB_VERSION} \
&& pip3 install cherrypy \
&& pip3 install -r requirements.txt \
&& apk del .build-deps \
&& find /usr/local -name '*.a' -delete \
&& addgroup -S omnidb && adduser -S omnidb -G omnidb \
&& chown -R omnidb:omnidb /opt/OmniDB-${OMNIDB_VERSION} \
&& chown -R omnidb:omnidb /etc/omnidb
USER omnidb
EXPOSE 8080 25482
WORKDIR /opt/OmniDB-${OMNIDB_VERSION}/OmniDB
ENTRYPOINT ["python3", "omnidb-server.py", "--host=0.0.0.0", "--port=8080", "-d", "/etc/omnidb"]