diff --git a/morphemic-persistent-storage/database/Dockerfile b/morphemic-persistent-storage/database/Dockerfile index 5fd5001e55dcf174ee85f39fd007d186c9cf3d8a..cd9459633010e79ccc738ebc1751310eafcd532c 100644 --- a/morphemic-persistent-storage/database/Dockerfile +++ b/morphemic-persistent-storage/database/Dockerfile @@ -7,47 +7,6 @@ FROM python:3.7-slim as api-loader COPY inputapi/requirements.txt . RUN pip install --user -r requirements.txt -# --- Stage 2: Combined InfluxDB + Python API Image -FROM python:3.7-alpine3.12 - -# :: InfluxDB standard setup -RUN echo 'hosts: files dns' >> /etc/nsswitch.conf -RUN apk add --no-cache tzdata bash ca-certificates && \ - update-ca-certificates - -ENV INFLUXDB_VERSION 1.8.4 -RUN set -ex && \ - mkdir ~/.gnupg; \ - echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf; \ - apk add --no-cache --virtual .build-deps wget gnupg tar && \ - for key in \ - 05CE15085FC09D18E99EFB22684A14CF2582E0C5 ; \ - do \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \ - gpg --keyserver pgp.mit.edu --recv-keys "$key" || \ - gpg --keyserver keyserver.pgp.com --recv-keys "$key" ; \ - done && \ - wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb-${INFLUXDB_VERSION}-static_linux_amd64.tar.gz.asc && \ - wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb-${INFLUXDB_VERSION}-static_linux_amd64.tar.gz && \ - gpg --batch --verify influxdb-${INFLUXDB_VERSION}-static_linux_amd64.tar.gz.asc influxdb-${INFLUXDB_VERSION}-static_linux_amd64.tar.gz && \ - mkdir -p /usr/src && \ - tar -C /usr/src -xzf influxdb-${INFLUXDB_VERSION}-static_linux_amd64.tar.gz && \ - rm -f /usr/src/influxdb-*/influxdb.conf && \ - chmod +x /usr/src/influxdb-*/* && \ - cp -a /usr/src/influxdb-*/* /usr/bin/ && \ - gpgconf --kill all && \ - rm -rf *.tar.gz* /usr/src /root/.gnupg && \ - apk del .build-deps -COPY influxdb.conf /etc/influxdb/influxdb.conf - -EXPOSE 8086 - -VOLUME /var/lib/influxdb - -COPY entrypoint.sh /entrypoint.sh -COPY init-influxdb.sh /init-influxdb.sh - - # :: Python API setup # Copy compiled dependencies from # the standard user pip directory @@ -56,10 +15,10 @@ COPY --from=api-loader /root/.local /root/.local ENV PATH=/root/.local:$PATH # Copy Python API. -RUN mkdir inputapi -RUN mkdir -p inputapi/log -COPY ./inputapi/src ./inputapi/ +RUN mkdir /app +RUN mkdir -p /app/log +COPY ./inputapi/src /app/ +WORKDIR /app # Execute both in entrypoint.sh. -ENTRYPOINT ["/entrypoint.sh"] -CMD ["influxd"] +CMD ["python","-u","app.py"] diff --git a/morphemic-persistent-storage/database/Dockerfile_without_influxdb b/morphemic-persistent-storage/database/Dockerfile_without_influxdb deleted file mode 100644 index cd9459633010e79ccc738ebc1751310eafcd532c..0000000000000000000000000000000000000000 --- a/morphemic-persistent-storage/database/Dockerfile_without_influxdb +++ /dev/null @@ -1,24 +0,0 @@ -# --- Stage 1: API Dependency Loader - -# :: Initial dependency loading image. -FROM python:3.7-slim as api-loader - -# Get package dependencies. -COPY inputapi/requirements.txt . -RUN pip install --user -r requirements.txt - -# :: Python API setup -# Copy compiled dependencies from -# the standard user pip directory -# and update PATH. -COPY --from=api-loader /root/.local /root/.local -ENV PATH=/root/.local:$PATH - -# Copy Python API. -RUN mkdir /app -RUN mkdir -p /app/log -COPY ./inputapi/src /app/ - -WORKDIR /app -# Execute both in entrypoint.sh. -CMD ["python","-u","app.py"]