influxdata / influxdata/influxdata-docker
Cant get influx logs
- Dominant language
- Shell
- Stars
- 364
- Forks
- 255
- Avg merge
- 3h 18m
- Merged PRs (30d)
- 7
Description
Docker file used:
```
FROM alpine
RUN echo 'hosts: files dns' >> /etc/nsswitch.conf
RUN apk add --no-cache tzdata bash
ENV INFLUXDB_VERSION 1.7.1
RUN set -ex && \
apk add --no-cache --virtual .build-deps wget gnupg tar ca-certificates && \
update-ca-certificates && \
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 -q https://dl.influxdata.com/influxdb/releases/influxdb-${INFLUXDB_VERSION}-static_linux_amd64.tar.gz.asc && \
wget -q 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/ && \
rm -rf *.tar.gz* /usr/src /root/.gnupg && \
apk del .build-deps && \
mkdir -p /opt/collectd && \
wget -q https://raw.githubusercontent.com/collectd/collectd/master/src/types.db -O /opt/collectd/types.db &&\
mkdir -p /var/log/influx/ &&\
touch /var/log/influx/influx.log &&\
touch /var/log/influx/error.log &&\
ln -sf /dev/stdout /var/log/influx/influx.log &&\
ln -sf /dev/stderr /var/log/influx/error.log
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
ENTRYPOINT ["/entrypoint.sh"]
CMD ["influxd"]
```
Docker run command: ```docker run -d -p 8086:8086 -v influxdb:/var/lib/influxdb -v /var/log/influx:/var/log/influx -e STDOUT=/dev/stdout -e STDOUT=/dev/stderr influx-logtest:latest```
Desired output: Must conatil all the logs in /var/log/influx/influx.log and /var/log/influx/error.log
Current output: No logs generated.
logs can be viewed only by docker logs
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Dockerfile and the referenced influxdb.conf, entrypoint.sh, and init-influxdb.sh; run the supplied Docker command and compare the configured log paths with the container output. Done means both /var/log/influx/influx.log and /var/log/influx/error.log contain the InfluxDB logs, rather than requiring docker logs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- devops, observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100