diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 75dcd72..0000000 --- a/.dockerignore +++ /dev/null @@ -1,4 +0,0 @@ -** -!package-lock.json -!package.json -!webpack.config.js diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 928b0be..0000000 --- a/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM public.ecr.aws/lambda/nodejs:18 - -WORKDIR /build - -COPY * ./ - -RUN npm --no-optional --no-audit --progress=false install - -RUN node ./node_modules/webpack/bin/webpack.js - -RUN node -e "console.log(require('sharp'))" - -RUN mkdir /dist && \ - echo "cp /build/dist/sharp-layer.zip /dist/sharp-layer.zip" > /entrypoint.sh && \ - chmod +x /entrypoint.sh - -ENTRYPOINT "/entrypoint.sh" \ No newline at end of file diff --git a/README.md b/README.md index 4a2f031..4dcd41a 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # AWS Sharp layer -This AWS lambda layer contains a pre-built [sharp](https://www.npmjs.com/package/sharp) npm library, so that you could "just use" it in your lambda code: +This AWS lambda layer contains a latest pre-built vanilla [sharp](https://www.npmjs.com/package/sharp) npm library, so that you could "just use" it in your lambda code: ```javascript import sharp from 'sharp' // ... ``` -It holds only necessary files to minimize its weight (16Mb). -It also supports all currently supported AWS lambda node runtimes (>=`nodejs14.x`) and architectures (`x86_64` and `arm64`). +It contains only necessary files to minimize its weight (16Mb). +It also supports all current AWS lambda node runtimes (>=`nodejs14.x`) and architectures (`x86_64` and `arm64`). # Getting A pre-built layer zip file is available on the [Releases page](../../releases). @@ -24,9 +24,10 @@ aws lambda publish-layer-version \ ``` # Building -Install dependencies (this will wipe your existing `node_modules/` directory): +Simply run (this will wipe your existing `node_modules/` directory): ```shell npm ci --arch=x64 --platform=linux ``` -Build will be performed automatically upon deps installation. \ No newline at end of file +Build will be performed automatically upon deps installation. +The resulted lambda layer zip file will be saved to `dist/` directory. \ No newline at end of file