cic-internal-integration/apps/cic-ussd/docker/Dockerfile

40 lines
1.3 KiB
Docker
Raw Permalink Normal View History

# syntax = docker/dockerfile:1.2
FROM registry.gitlab.com/grassrootseconomics/cic-base-images:python-3.8.6-dev-55da5f4e as dev
2021-08-06 18:29:01 +02:00
RUN apt-get install -y redis-server
2021-03-05 17:28:07 +01:00
# create secrets directory
RUN mkdir -vp pgp/keys
2021-02-06 16:13:47 +01:00
# create application directory
RUN mkdir -vp cic-ussd
2021-03-05 20:09:22 +01:00
RUN mkdir -vp data
2021-02-06 16:13:47 +01:00
ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433"
ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple"
2021-09-17 13:15:43 +02:00
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \
--extra-index-url $GITLAB_PYTHON_REGISTRY \
--extra-index-url $EXTRA_INDEX_URL \
cic-eth-aux-erc20-demurrage-token~=0.0.2a6
COPY requirements.txt .
2021-02-06 16:13:47 +01:00
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \
--extra-index-url $GITLAB_PYTHON_REGISTRY --extra-index-url $EXTRA_INDEX_URL \
-r requirements.txt
2021-02-06 16:13:47 +01:00
COPY . .
RUN python setup.py install
2021-02-06 16:13:47 +01:00
COPY cic_ussd/db/ussd_menu.json data/
2021-02-06 16:13:47 +01:00
COPY docker/*.sh .
2021-02-06 16:13:47 +01:00
RUN chmod +x /root/*.sh
# copy config and migration files to definitive file so they can be referenced in path definitions for running scripts
2021-08-06 18:29:01 +02:00
COPY config/ /usr/local/etc/cic-ussd/
COPY cic_ussd/db/migrations/ /usr/local/share/cic-ussd/alembic
2021-02-22 18:51:57 +01:00
ENTRYPOINT []