Commit d4d25892 authored by Jean-Didier's avatar Jean-Didier
Browse files

removing influxdb from persistents storage

parent 28e86533
Pipeline #18211 canceled with stage
in 0 seconds
......@@ -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"]
# --- 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
# --- 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
# and update PATH.
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/
# Execute both in entrypoint.sh.
ENTRYPOINT ["/entrypoint.sh"]
CMD ["influxd"]
# --- 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"]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment