Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing trader.so as layer #356

Open
sahilr2050 opened this issue Aug 14, 2022 · 0 comments
Open

installing trader.so as layer #356

sahilr2050 opened this issue Aug 14, 2022 · 0 comments

Comments

@sahilr2050
Copy link

sahilr2050 commented Aug 14, 2022

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant