Skip to content

Instantly share code, notes, and snippets.

@vdeturckheim vdeturckheim/Dockerfile Secret
Last active Mar 24, 2020

Embed
What would you like to do?
Crash when loading a native dep in Node.js on alpine
FROM node:10.19-alpine
WORKDIR code
COPY . .
RUN npm install
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "test.js",
"scripts": {
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"grpc": "^1.24.2"
}
}
docker build . -t test_node_alpine
docker run test_node_alpine node test.js
'use strict'
try {
require('grpc');
}
catch(e) {
console.log(e);
}
console.log('process did not crash');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.