Dockerfile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. && \
  33. # Delete apt-cache and let people apt-update on start. Without this, we keep getting apt-get errors for --fix-missing
  34. rm -rf /var/cache/apt /var/lib/apt/lists
  35. # gosu
  36. 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
  37. ## the installations are kept separate since these change a lot compared to above
  38. # node
  39. RUN mkdir -p /usr/local/node-10.15.1 && \
  40. 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
  41. #RUN mkdir -p /usr/local/node-8.12.0 && \
  42. # 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
  43. # Go
  44. ENV GOROOT /usr/local/go-1.11.1
  45. RUN mkdir -p /usr/local/go-1.11.1 && \
  46. 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
  47. # Put node, go in the path by default
  48. ENV PATH /usr/local/node-10.15.1/bin:$GOROOT/bin:$PATH
  49. # add a non-previleged user that apps can use
  50. # by default, account is created as inactive which prevents login via openssh
  51. # https://github.com/gitlabhq/gitlabhq/issues/5304
  52. RUN adduser --uid 1000 --disabled-login --gecos 'Cloudron' cloudron && \
  53. passwd -d cloudron