Open rbjs opened 2 years ago
I don't know if an official Docker image is really needed for Brain.js, since so few people would actually use it as their base image. Most people are going to want a base image that's a little more agnostic, like the node image.
Anyway, I got Brain.js working in node:alpine. Here's an example Dockerfile you could build upon:
FROM node:19-alpine
MAINTAINER Original Design
RUN apk update && \
apk add \
alpine-sdk \
glew-dev \
libxi-dev \
pkgconf \
python3
RUN ln -s /usr/bin/python3 /usr/bin/python
WORKDIR /app
COPY package*.json tsconfig.json ./
RUN npm install
COPY src ./src
RUN npm run build
RUN chown -R node /app && chmod -R 740 /app
USER node
ENV NODE_ENV=production
CMD ["npm", "start"]
I tried to containerize node app with brain.js using node:alpine image. But with any result (lots of errors).
Maybe someone had better luck?
Will be great to have official docker image for brain.js.