extra-php-extensions
extra-php-extensions copied to clipboard
installing trader.so as layer
OS: Windows 11
Working Directory: D:/bref-extra/trader-php-74/layers/trader/
Docker file placed in Above Working Directory
Dockerfile
FROM bref/build-php-73 AS ext
ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH
RUN yum -y install amazon-linux-extras
RUN amazon-linux-extras install epel -y
RUN yum install -y trader
RUN echo 'extension=/opt/bref-extra/trader.so' > /tmp/ext.ini
# Build the final image with just the files we need
FROM scratch
# Copy things we installed to the final image
COPY --from=ext /usr/lib64/php/modules/trader.so /opt/bref-extra/trader.so
COPY --from=ext /tmp/ext.ini /opt/bref/etc/php/conf.d/ext-trader.ini
I used imap dockerfile as reference
What I am trying to achieve:
Install Trader Extension:
- As Trader extension is available in the
amazon-linux-extras:RUN yum -y install amazon-linux-extras -
RUN amazon-linux-extras install epel -y - Install trader extension:
RUN yum install -y trader
Create .ini file:
-
RUN echo 'extension=/opt/bref-extra/trader.so' > /tmp/ext.ini
Copy .so and .ini to bref
-
COPY --from=ext /usr/lib64/php/modules/trader.so /opt/bref-extra/trader.so -
COPY --from=ext /tmp/ext.ini /opt/bref/etc/php/conf.d/ext-trader.ini
Please let me know if I am doing anything wrong until the end of the above code.
As I am using WINDOWS 11, I am stuck at this point. Making Layer
Questions:
- How can I make a layer in Windows 11?
- How to make a zip file?
- What contents will be in the ZIP file?
- Can someone attach example ZIP file of layer which should be uploaded to lambda layer from AWS Console.