Visitar URL original
installing trader.so as layer · Issue #356 · brefphp/extra-php-extensions · GitHub
Skip to content

installing trader.so as layer #356

Description

@sahilr2050

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:

  1. How can I make a layer in Windows 11?
  2. How to make a zip file?
  3. What contents will be in the ZIP file?
  4. Can someone attach example ZIP file of layer which should be uploaded to lambda layer from AWS Console.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions