You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.2 KiB

3 years ago
  1. FROM ubuntu:21.04
  2. LABEL maintainer="Taylor Otwell"
  3. ARG WWWGROUP
  4. WORKDIR /var/www/html
  5. ENV DEBIAN_FRONTEND noninteractive
  6. ENV TZ=UTC
  7. RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
  8. RUN apt-get update \
  9. && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 \
  10. && mkdir -p ~/.gnupg \
  11. && chmod 600 ~/.gnupg \
  12. && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf \
  13. && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C \
  14. && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C \
  15. && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu hirsute main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
  16. && apt-get update \
  17. && apt-get install -y php7.4-cli php7.4-dev \
  18. php7.4-pgsql php7.4-sqlite3 php7.4-gd \
  19. php7.4-curl php7.4-memcached \
  20. php7.4-imap php7.4-mysql php7.4-mbstring \
  21. php7.4-xml php7.4-zip php7.4-bcmath php7.4-soap \
  22. php7.4-intl php7.4-readline php7.4-pcov \
  23. php7.4-msgpack php7.4-igbinary php7.4-ldap \
  24. php7.4-redis \
  25. && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \
  26. && curl -sL https://deb.nodesource.com/setup_16.x | bash - \
  27. && apt-get install -y nodejs \
  28. && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
  29. && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
  30. && apt-get update \
  31. && apt-get install -y yarn \
  32. && apt-get install -y mysql-client \
  33. && apt-get install -y postgresql-client \
  34. && apt-get -y autoremove \
  35. && apt-get clean \
  36. && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  37. RUN setcap "cap_net_bind_service=+ep" /usr/bin/php7.4
  38. RUN groupadd --force -g $WWWGROUP sail
  39. RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail
  40. COPY start-container /usr/local/bin/start-container
  41. COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
  42. COPY php.ini /etc/php/7.4/cli/conf.d/99-sail.ini
  43. RUN chmod +x /usr/local/bin/start-container
  44. EXPOSE 8000
  45. ENTRYPOINT ["start-container"]