clean-install-arch.Dockerfile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. FROM archlinux/base:latest
  2. # There is some redundancy between this file and the archlinux Dockerfile in the helper images
  3. # repo and also with the clean-install.Dockerfile. Once the help image is available on Docker
  4. # Hub this file can be deleted.
  5. RUN pacman -Sy
  6. RUN pacman --noconfirm --needed -S autoconf \
  7. autoconf-archive \
  8. autogen \
  9. automake \
  10. gcc \
  11. make \
  12. git \
  13. libuv \
  14. lz4 \
  15. netcat \
  16. openssl \
  17. pkgconfig \
  18. python \
  19. libvirt \
  20. cmake
  21. ARG ACLK=no
  22. ARG EXTRA_CFLAGS
  23. COPY . /opt/netdata/source
  24. WORKDIR /opt/netdata/source
  25. RUN git config --global user.email "root@container"
  26. RUN git config --global user.name "Fake root"
  27. # RUN make distclean -> not safe if tree state changed on host since last config
  28. # Kill everything that is not in .gitignore preserving any fresh changes, i.e. untracked changes will be
  29. # deleted but local changes to tracked files will be preserved.
  30. RUN if git status --porcelain | grep '^[MADRC]'; then \
  31. git stash && git clean -dxf && (git stash apply || true) \
  32. else \
  33. git clean -dxf ; \
  34. fi
  35. # Not everybody is updating distclean properly - fix.
  36. RUN find . -name '*.Po' -exec rm \{\} \;
  37. RUN rm -rf autom4te.cache
  38. RUN rm -rf .git/
  39. RUN find . -type f >/opt/netdata/manifest
  40. RUN CFLAGS="-O1 -ggdb -Wall -Wextra -Wformat-signedness -DNETDATA_INTERNAL_CHECKS=1\
  41. -DNETDATA_VERIFY_LOCKS=1 ${EXTRA_CFLAGS}" ./netdata-installer.sh --disable-lto
  42. RUN ln -sf /dev/stdout /var/log/netdata/access.log && \
  43. ln -sf /dev/stdout /var/log/netdata/debug.log && \
  44. ln -sf /dev/stderr /var/log/netdata/error.log && \
  45. ln -sf /dev/stdout /var/log/netdata/fluentbit.log
  46. CMD ["/usr/sbin/netdata", "-D"]