Dockerized php7.2-apache with ODBC support, build according to : https://www.microsoft.com/en-us/sql-server/developer-get-started/php/ubuntu/
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

31 行
1.5 KiB

  1. FROM php:7.2-apache as builder
  2. RUN echo 'Acquire::HTTP::Proxy "http://172.17.0.1:3142";' >> /etc/apt/apt.conf.d/01proxy \
  3. && apt-get update
  4. RUN apt-get install -y curl gnupg2 apt-transport-https ca-certificates \
  5. && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
  6. && curl https://packages.microsoft.com/config/debian/9/prod.list \
  7. > /etc/apt/sources.list.d/mssql-release.list \
  8. && apt-get update
  9. RUN ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools unixodbc-dev \
  10. && pecl install sqlsrv pdo_sqlsrv
  11. FROM php:7.2-apache
  12. RUN echo 'Acquire::HTTP::Proxy "http://172.17.0.1:3142";' >> /etc/apt/apt.conf.d/01proxy \
  13. && apt-get update
  14. RUN apt-get install -y curl gnupg2 apt-transport-https ca-certificates \
  15. && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
  16. && curl https://packages.microsoft.com/config/debian/9/prod.list \
  17. > /etc/apt/sources.list.d/mssql-release.list \
  18. && apt-get update \
  19. && ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools
  20. RUN apt-get install -y locales \
  21. && echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
  22. && locale-gen \
  23. && a2enmod rewrite
  24. COPY --from=builder /usr/local/bin/ /usr/local/bin/
  25. COPY --from=builder /usr/local/etc/ /usr/local/etc/
  26. COPY --from=builder /usr/local/lib/ /usr/local/lib/
  27. COPY --from=builder /usr/local/sbin/ /usr/local/sbin/
  28. COPY php-config/mssql-odbc.ini /usr/local/etc/php/conf.d/
  29. ENV PATH="/opt/mssql-tools/bin:${PATH}"