prepare 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/bash
  2. set -e
  3. cat > /etc/dpkg/dpkg.cfg.d/01_nodoc <<EOF
  4. # Delete locales
  5. path-exclude=/usr/share/locale/*
  6. # Delete man pages
  7. path-exclude=/usr/share/man/*
  8. # Delete docs
  9. path-exclude=/usr/share/doc/*
  10. path-include=/usr/share/doc/*/copyright
  11. EOF
  12. export LC_ALL=C
  13. export DEBIAN_FRONTEND=noninteractive
  14. CLEAR_DOCKER_CACHE=2020-05-28
  15. minimal_apt_get_install='apt-get install -y --no-install-recommends'
  16. apt-get update
  17. apt-get dist-upgrade -y --no-install-recommends
  18. $minimal_apt_get_install software-properties-common
  19. add-apt-repository -y ppa:brightbox/ruby-ng
  20. apt-get update
  21. $minimal_apt_get_install build-essential checkinstall git-core \
  22. zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev \
  23. libncurses5-dev libffi-dev libxml2-dev libxslt-dev curl libcurl4-openssl-dev libicu-dev \
  24. graphviz libmysqlclient-dev libpq-dev libsqlite3-dev \
  25. ruby2.5 ruby2.5-dev locales tzdata iputils-ping
  26. locale-gen en_US.UTF-8
  27. update-locale LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8
  28. gem install --no-document bundler -v 1.17.3
  29. apt-get purge -y python3* rsyslog rsync manpages
  30. apt-get -y clean
  31. apt-get -y autoremove
  32. rm -rf /var/lib/apt/lists/*
  33. rm -rf /usr/share/doc/
  34. rm -rf /usr/share/man/
  35. rm -rf /usr/share/locale/
  36. rm -rf /var/log/*
  37. # Install the latest jq for JqAgent
  38. curl -fsSL -o /usr/local/bin/jq https://github.com/stedolan/jq/releases/latest/download/jq-linux64
  39. chmod +x /usr/local/bin/jq
  40. mkdir -p /app
  41. chmod -R g=u /etc/passwd /app