Created
November 7, 2024 12:12
-
-
Save phaelfp/a3cc77b8d149c5cd0e7de4b3b731aa35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:8.3.13-cli-alpine3.20 | |
ENV USER=docker | |
ENV GROUPNAME=$USER | |
ENV UID=1000 | |
ENV GID=1000 | |
ENV TZ=America/Sao_Paulo | |
ENV ORACLE_BASE /usr/lib/instantclient | |
ENV LD_LIBRARY_PATH /usr/lib/instantclient | |
ENV TNS_ADMIN /usr/lib/instantclient | |
ENV ORACLE_HOME /usr/lib/instantclient | |
WORKDIR /app | |
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ | |
RUN apk update \ | |
&& apk add --no-cache git make curl openrc tzdata libaio libnsl libc6-compat && cd /tmp \ | |
&& curl -o instantclient-basiclite.zip https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip -SL && \ | |
unzip instantclient-basiclite.zip && \ | |
mv instantclient*/ /usr/lib/instantclient && \ | |
rm instantclient-basiclite.zip && \ | |
ln -s /usr/lib/instantclient/libclntsh.so.19.1 /usr/lib/libclntsh.so && \ | |
ln -s /usr/lib/instantclient/libocci.so.19.1 /usr/lib/libocci.so && \ | |
ln -s /usr/lib/instantclient/libociicus.so /usr/lib/libociicus.so && \ | |
ln -s /usr/lib/instantclient/libnnz19.so /usr/lib/libnnz19.so && \ | |
ln -s /usr/lib/libnsl.so.2 /usr/lib/libnsl.so.1 && \ | |
ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ | |
ln -s /lib64/ld-linux-x86-64.so.2 /usr/lib/ld-linux-x86-64.so.2 \ | |
&& install-php-extensions amqp apcu ctype curl posix tokenizer iconv intl json mbstring opcache openssl \ | |
pcntl dom xml xmlwriter fileinfo pdo phar pdo_pgsql pgsql xdebug zlib session simplexml soap mysqli \ | |
pdo_mysql oci8 pdo_oci mongodb redis sockets stomp tidy uuid xlswriter \ | |
yaml @composer \ | |
&& addgroup \ | |
--gid "$GID" \ | |
"$GROUPNAME" \ | |
&& adduser \ | |
--disabled-password \ | |
--gecos "" \ | |
--home "$(pwd)" \ | |
--ingroup "$GROUPNAME" \ | |
--no-create-home \ | |
--uid "$UID" \ | |
$USER | |
USER $USER | |
EXPOSE 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment