tpotce/docker/deprecated/hpfeeds/Dockerfile

43 lines
1.2 KiB
Text
Raw Normal View History

2018-05-30 15:46:18 +00:00
### This is only for testing purposes, do NOT use for production
2020-02-25 16:59:22 +00:00
FROM alpine:latest
#
2018-05-30 15:46:18 +00:00
ADD dist/ /root/dist/
2020-02-25 16:59:22 +00:00
#
2018-05-30 15:46:18 +00:00
# Install packages
2020-02-25 16:59:22 +00:00
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
apk -U --no-cache add \
2018-05-30 15:46:18 +00:00
build-base \
coreutils \
git \
libffi \
libffi-dev \
py-gevent \
py-pip \
python \
python-dev \
sqlite && \
2020-02-25 16:59:22 +00:00
#
2018-05-30 15:46:18 +00:00
# Install php sandbox from git
git clone --depth=1 https://github.com/rep/hpfeeds /opt/hpfeeds && \
cd /opt/hpfeeds/broker && \
sed -i -e '87d;88d' database.py && \
cp /root/dist/adduser.sql . && \
cd /opt/hpfeeds/broker && timeout 5 python broker.py || : && \
sqlite3 db.sqlite3 < adduser.sql && \
2020-02-25 16:59:22 +00:00
#
2018-05-30 15:46:18 +00:00
#python setup.py build && \
#python setup.py install && \
2020-02-25 16:59:22 +00:00
#
2018-05-30 15:46:18 +00:00
# Clean up
apk del --purge autoconf \
build-base \
coreutils \
libffi-dev \
python-dev && \
rm -rf /root/* && \
rm -rf /var/cache/apk/*
2020-02-25 16:59:22 +00:00
#
2018-05-30 15:46:18 +00:00
# Set workdir and start glastopf
WORKDIR /opt/hpfeeds/broker
CMD python broker.py