Suor / serverless-docker-artifacts

A Serverless plugin to build your artifacts within docker container
BSD 2-Clause "Simplified" License
5 stars 2 forks source link

Question - Usage #1

Open josoroma-zz opened 4 years ago

josoroma-zz commented 4 years ago

Hi!

I am have been working on a serverless app in node, without any problems on my mac, suddenly using the sharp library I got stuck making the endpoint work, sharp is not being builded fine because it needs the right Linux environment for that, which for lambda+sharp must to be Linux.

So I was wondering... Do this plugin will help me to make an sls deploy from mac to behave as a deploy running via a Linux container right?

FROM node:lts-alpine
#
# Install Serverless Framework
#
RUN npm install -g serverless

Some examples would be great, thanks!

Suor commented 4 years ago

You are supposed to build whatever you want to ship in docker, so normally you don't need serverless inside. You should probably use lambci/lambda or its friends as a base image to emulate lambda.

So the instruction is:

The example of a dockerfile you can see here.

If you think README might be improved then a PR is welcome.