docker-ckan/datapusher/Dockerfile

38 lines
955 B
Docker
Raw Normal View History

2020-09-29 16:56:10 +02:00
FROM alpine:3.7
2020-09-17 11:42:27 +02:00
ENV APP_DIR=/srv/app
2020-09-29 16:56:10 +02:00
ENV GIT_BRANCH master
2020-09-17 11:42:27 +02:00
ENV GIT_URL https://github.com/ckan/datapusher.git
ENV JOB_CONFIG ${APP_DIR}/datapusher_settings.py
WORKDIR ${APP_DIR}
RUN apk add --no-cache python \
py-pip \
py-gunicorn \
libffi-dev \
libressl-dev \
libxslt && \
# Temporary packages to build CKAN requirements
apk add --no-cache --virtual .build-deps \
gcc \
git \
musl-dev \
python-dev \
libxml2-dev \
libxslt-dev && \
# Fetch datapusher and install
mkdir ${APP_DIR}/src && cd ${APP_DIR}/src && \
git clone -b ${GIT_BRANCH} --depth=1 --single-branch ${GIT_URL} && \
cd datapusher && \
python setup.py install && \
pip install --no-cache-dir -r requirements.txt && \
# Remove temporary packages and files
apk del .build-deps && \
rm -rf ${APP_DIR}/src
COPY setup ${APP_DIR}
EXPOSE 8800
CMD ["gunicorn", "--bind=0.0.0.0:8800", "--log-file=-", "wsgi"]