We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63e79ed commit b27b231Copy full SHA for b27b231
3 files changed
.dockerignore
@@ -2,3 +2,4 @@
2
!package-lock.json
3
!package.json
4
!webpack.config.js
5
+!test.js
Dockerfile
@@ -12,7 +12,7 @@ RUN npm --no-optional --no-audit --progress=false install
12
13
RUN node ./node_modules/webpack/bin/webpack.js
14
15
-RUN node -e "console.log(require('sharp'))"
+RUN node ./test.js || (echo 'Test failed'; exit 1)
16
17
RUN mkdir /dist && \
18
echo "cp /build/dist/sharp-layer.zip /dist/sharp-layer.$(uname -m).zip" > /entrypoint.sh && \
test.js
@@ -0,0 +1,6 @@
1
+const sharp = require('sharp');
+
+// 1x1 png
+const png = Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=', 'base64');
6
+sharp(png).rotate(180).toBuffer()
0 commit comments