hfelix

Dockerfile

Feb 2nd, 2022 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. FROM php:7.4-apache
  2.  
  3. RUN apt-get update && \
  4. apt-get install -y supervisor openssh-server apache2 && \
  5. mkdir -p /var/lock/apache2 /var/run/apache2 /var/run/sshd \
  6. apt-get clean
  7.  
  8. LABEL maintainer="Henrique Felix<hfelixmiguell@gmail.com>"
  9. ENV COMPOSER_MEMORY_LIMIT=-1
  10.  
  11. # 1. Install development packages and clean up apt cache.
  12. RUN apt-get update && apt-get install -y \
  13. curl \
  14. mlocate \
  15. sudo \
  16. nano \
  17. cron \
  18. libpq-dev \
  19. && rm -rf /var/lib/apt/lists/*
  20.  
  21. RUN apt-get clean -y
  22. # 4. Start with base PHP config, then add extensions.
  23. RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
  24. RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql
  25. ############# PHP EXTENSIONS ####################
  26. RUN docker-php-ext-install \
  27. pdo \
  28. pdo_mysql \
  29. pdo_pgsql \
  30. pgsql
  31.  
  32. RUN docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql
  33. RUN docker-php-ext-install pdo pdo_pgsql
  34.  
  35. RUN apt-get clean -y
  36. RUN docker-php-ext-enable pdo pgsql pdo_pgsql
  37.  
  38. RUN mkdir -p /var/log/supervisor
  39. # COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
  40.  
  41. # Set USER
  42. RUN useradd -ms /bin/bash devuser
  43. USER root
  44.  
  45. EXPOSE 8089
  46.  
  47. WORKDIR /var/www
Add Comment
Please, Sign In to add comment