Dockerfile 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # https://github.com/docker-library/repo-info/blob/master/repos/ubuntu/remote/bionic-20180821.md
  2. FROM ubuntu:bionic-20180821@sha256:de774a3145f7ca4f0bd144c7d4ffb2931e06634f11529653b23eba85aef8e378
  3. ENV DEBIAN_FRONTEND noninteractive
  4. # Do not cache apt packages
  5. # https://wiki.ubuntu.com/ReducingDiskFootprint
  6. RUN echo 'Acquire::http {No-Cache=True;};' > /etc/apt/apt.conf.d/no-cache && \
  7. echo 'APT::Install-Recommends "0"; APT::Install-Suggests "0";' > /etc/apt/apt.conf.d/01norecommend && \
  8. echo 'Dir::Cache { srcpkgcache ""; pkgcache ""; }' > /etc/apt/apt.conf.d/02nocache && \
  9. echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/02compress-indexes
  10. RUN apt-get -y update && \
  11. # Software installation
  12. apt-get -y install ca-certificates curl git wget unzip zip software-properties-common build-essential \
  13. # Process managers
  14. supervisor \
  15. # install sendmail
  16. postfix \
  17. # install net packages useful for debugging
  18. iputils-ping telnet netcat lsof net-tools openssl dnsutils rsync bind9-host \
  19. # config file manipulation
  20. crudini xmlstarlet moreutils jq \
  21. # General purpose
  22. pwgen swaks vim nano cmake pkg-config openssh-client uuid sudo less zip dirmngr gpg gpg-agent file \
  23. # apache
  24. apache2 libapache2-mod-php7.2 libapache2-mod-perl2 \
  25. # nginx
  26. nginx-full \
  27. # Databases (clients)
  28. sqlite3 mysql-client redis-tools postgresql-client ldap-utils mongodb-clients \
  29. # Dev packages (useful for native modules in ruby, node)
  30. gettext imagemagick libcurl4 libcurl4-openssl-dev libexpat1-dev libffi-dev libgdbm-dev libicu-dev libmysqlclient-dev \
  31. libncurses5-dev libpq-dev libre2-dev libreadline-dev libssl-dev libxml2-dev libxslt-dev libyaml-dev zlib1g-dev \
  32. # perl
  33. perl \
  34. # ruby (note that gem is now called gem2.1 and gem2.2)
  35. ruby2.5-dev \
  36. # Python
  37. python2.7 gunicorn uwsgi-plugin-python python-dev python-pip python-setuptools virtualenv \
  38. # php
  39. php-apcu php-geoip php-imagick php-redis php7.2-bcmath php7.2-cli php7.2-ctype php7.2-curl php7.2-dom php7.2-fileinfo php7.2-fpm php7.2-gd php7.2-gettext php7.2-gmp php7.2-json \
  40. php7.2-iconv php7.2-imap php7.2-intl php7.2-ldap php7.2-mbstring php7.2-mysqlnd php7.2-phar php-pear php7.2-pgsql php7.2-redis \
  41. php7.2-simplexml php7.2-soap php7.2-sqlite php7.2-tokenizer php7.2-xml php7.2-xmlrpc php7.2-zip phpmyadmin composer
  42. # Delete apt-cache and let people apt-update on start. Without this, we keep getting apt-get errors for --fix-missing
  43. RUN apt-get -y install tor torsocks
  44. RUN rm -rf /var/cache/apt /var/lib/apt/lists
  45. # gosu
  46. RUN curl -L https://github.com/tianon/gosu/releases/download/1.10/gosu-amd64 -o /usr/local/bin/gosu && chmod +x /usr/local/bin/gosu
  47. ## the installations are kept separate since these change a lot compared to above
  48. # node
  49. RUN mkdir -p /usr/local/node-10.15.1 && \
  50. curl -L https://nodejs.org/download/release/v10.15.1/node-v10.15.1-linux-x64.tar.gz | tar zxf - --strip-components 1 -C /usr/local/node-10.15.1
  51. #RUN mkdir -p /usr/local/node-8.12.0 && \
  52. # curl -L https://nodejs.org/download/release/v8.12.0/node-v8.12.0-linux-x64.tar.gz | tar zxf - --strip-components 1 -C /usr/local/node-8.12.0
  53. # Go
  54. ENV GOROOT /usr/local/go-1.11.1
  55. RUN mkdir -p /usr/local/go-1.11.1 && \
  56. curl -L https://storage.googleapis.com/golang/go1.11.1.linux-amd64.tar.gz | tar zxf - -C /usr/local/go-1.11.1 --strip-components 1
  57. # Put node, go in the path by default
  58. ENV PATH /usr/local/node-10.15.1/bin:$GOROOT/bin:$PATH
  59. # add a non-previleged user that apps can use
  60. # by default, account is created as inactive which prevents login via openssh
  61. # https://github.com/gitlabhq/gitlabhq/issues/5304
  62. RUN adduser --uid 1000 --disabled-login --gecos 'Cloudron' cloudron && \
  63. passwd -d cloudron