Closed Crazy-kun closed 2 years ago
My Dockerfile:
FROM node:12.10-alpine ENV TZ Europe/Moscow RUN apk add --no-cache g++ gcc make python hunspell RUN mkdir -p /var/www COPY . /var/www WORKDIR /var/www RUN npm -v \ && npm i node-gyp \ && npm ci \ && npm run build \ && npm cache clean --force EXPOSE 80 CMD ["node", "--harmony", "--max-http-header-size=262144", "dist/server/index.js"]
My index.ts:
import { Nodehun } from "nodehun"; import fs from "fs"; const affix = fs.readFileSync("./data/ru_RU.aff"); const dict = fs.readFileSync("./data/ru_RU.dic"); const nodehun = new Nodehun(affix, dict); const is_right = nodehun.spellSync("text"); console.log("unreachable code");
Result: [Node] [nodemon] app crashed - waiting for file changes before starting...
[Node] [nodemon] app crashed - waiting for file changes before starting...
If i run it outside the container - all works fine.
My Dockerfile:
My index.ts:
Result:
[Node] [nodemon] app crashed - waiting for file changes before starting...
If i run it outside the container - all works fine.