clean-install-arch-extras.Dockerfile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 echo sdlsjdkls
  6. RUN pacman -Syyu --noconfirm
  7. RUN pacman --noconfirm --needed -S autoconf \
  8. autoconf-archive \
  9. autogen \
  10. automake \
  11. gcc \
  12. make \
  13. git \
  14. libuv \
  15. lz4 \
  16. netcat \
  17. openssl \
  18. pkgconfig \
  19. python \
  20. libvirt \
  21. cmake \
  22. valgrind \
  23. gdb
  24. ARG EXTRA_CFLAGS
  25. COPY . /opt/netdata/source
  26. WORKDIR /opt/netdata/source
  27. RUN git config --global user.email "root@container"
  28. RUN git config --global user.name "Fake root"
  29. # RUN make distclean -> not safe if tree state changed on host since last config
  30. # Kill everything that is not in .gitignore preserving any fresh changes, i.e. untracked changes will be
  31. # deleted but local changes to tracked files will be preserved.
  32. RUN if git status --porcelain | grep '^[MADRC]'; then \
  33. git stash && git clean -dxf && (git stash apply || true) \
  34. else \
  35. git clean -dxf ; \
  36. fi
  37. # Not everybody is updating distclean properly - fix.
  38. RUN find . -name '*.Po' -exec rm \{\} \;
  39. RUN rm -rf autom4te.cache
  40. RUN rm -rf .git/
  41. RUN find . -type f >/opt/netdata/manifest
  42. RUN CFLAGS="-Og -g -ggdb -Wall -Wextra -Wformat-signedness -DNETDATA_INTERNAL_CHECKS=1\
  43. -DNETDATA_VERIFY_LOCKS=1 ${EXTRA_CFLAGS}" ./netdata-installer.sh --require-cloud --disable-lto
  44. RUN ln -sf /dev/stdout /var/log/netdata/access.log
  45. RUN ln -sf /dev/stdout /var/log/netdata/debug.log
  46. RUN ln -sf /dev/stderr /var/log/netdata/error.log
  47. RUN rm /var/lib/netdata/registry/netdata.public.unique.id
  48. CMD ["/usr/sbin/valgrind", "--leak-check=full", "/usr/sbin/netdata", "-D"]