mirror of
https://github.com/11notes/docker-influxdb.git
synced 2025-10-23 00:02:10 +00:00
first commit
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
maintain/
|
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2022 11notes
|
Copyright (c) 2021 11notes
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
28
README.md
Normal file
28
README.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# Alpine :: InfluxDB
|
||||||
|
Run InfluxDB based on Alpine Linux. Small, lightweight, secure and fast 🏔️
|
||||||
|
|
||||||
|
## Run
|
||||||
|
```shell
|
||||||
|
docker run --name influxdb \
|
||||||
|
-v .../etc:/influxdb/etc \
|
||||||
|
-v .../var:/influxdb/var \
|
||||||
|
-d 11notes/influxdb:[tag]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Defaults
|
||||||
|
| Parameter | Value | Description |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `user` | docker | user docker |
|
||||||
|
| `uid` | 1000 | user id 1000 |
|
||||||
|
| `gid` | 1000 | group id 1000 |
|
||||||
|
|
||||||
|
## Parent
|
||||||
|
* [influxdb:2.7-alpine](https://github.com/influxdata/influxdata-docker/tree/master/influxdb/2.7/alpine)
|
||||||
|
|
||||||
|
## Built with
|
||||||
|
* [influxdb](https://github.com/influxdata/influxdb)
|
||||||
|
* [Alpine Linux](https://alpinelinux.org/)
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
* Don't bind to ports < 1024 (requires root), use NAT/reverse proxy
|
||||||
|
* [Permanent Stroage](https://github.com/11notes/alpine-docker-netshare) - Module to store permanent container data via NFS/CIFS and more
|
46
amd64.dockerfile
Normal file
46
amd64.dockerfile
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# :: Header
|
||||||
|
FROM influxdb:2.7-alpine
|
||||||
|
|
||||||
|
# :: Run
|
||||||
|
USER root
|
||||||
|
|
||||||
|
# :: update image
|
||||||
|
RUN set -ex; \
|
||||||
|
apk --update --no-cache add \
|
||||||
|
curl \
|
||||||
|
tzdata \
|
||||||
|
shadow; \
|
||||||
|
apk update; \
|
||||||
|
apk upgrade;
|
||||||
|
|
||||||
|
# :: prepare image
|
||||||
|
RUN set -ex; \
|
||||||
|
mkdir -p /influxdb; \
|
||||||
|
ln -s /etc/influxdb2 /influxdb/etc; \
|
||||||
|
ln -s /var/lib/influxdb2 /influxdb/var; \
|
||||||
|
mv /entrypoint.sh /usr/local/bin;
|
||||||
|
|
||||||
|
# :: copy root filesystem changes and add execution rights to init scripts
|
||||||
|
COPY ./rootfs /
|
||||||
|
RUN set -ex; \
|
||||||
|
chmod +x -R /usr/local/bin;
|
||||||
|
|
||||||
|
# :: change home path for existing user and set correct permission
|
||||||
|
RUN set -ex; \
|
||||||
|
usermod -l docker influxdb; \
|
||||||
|
groupmod -n docker influxdb; \
|
||||||
|
usermod -d /influxdb docker; \
|
||||||
|
chown -R 1000:1000 \
|
||||||
|
/influxdb \
|
||||||
|
/etc/influxdb2 \
|
||||||
|
/var/lib/influxdb2;
|
||||||
|
|
||||||
|
# :: Volumes
|
||||||
|
VOLUME ["/influxdb/etc", "/influxdb/var"]
|
||||||
|
|
||||||
|
# :: Monitor
|
||||||
|
HEALTHCHECK CMD /usr/local/bin/healthcheck.sh || exit 1
|
||||||
|
|
||||||
|
# :: Start
|
||||||
|
USER docker
|
||||||
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
2
rootfs/usr/local/bin/healthcheck.sh
Normal file
2
rootfs/usr/local/bin/healthcheck.sh
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/ash
|
||||||
|
curl --max-time 5 -kILs --fail http://localhost:8086/ping
|
Reference in New Issue
Block a user