Skip to content

Instantly share code, notes, and snippets.

View morintd's full-sized avatar

Teddy MORIN morintd

View GitHub Profile
# Use a fixed Long-Term-Support (LTS) version of node, with the alpine distribution
FROM node:18.17.0-alpine
# Necessary dependencies
RUN apk update && apk add --no-cache tini
# Replace by next line if you need to install & build native dependencies
# RUN apk add --no-cache tini g++ make py3-pip
# Create the working directory, including the node_modules folder for the sake of assigning ownership in the next command
FROM node:18.16.0-alpine
# Necessary dependencies
RUN apk update
RUN apk add --no-cache g++ make py3-pip curl jq tini
# Create the working directory, including the node_modules folder for the sake of assigning ownership in the next command
RUN mkdir -p /usr/src/app/node_modules
# Change ownership of the working directory to the node:node user:group