Skip to content

Instantly share code, notes, and snippets.

@aqmattil
Created May 14, 2020 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aqmattil/2d4df04698168d0e5a3928b111120017 to your computer and use it in GitHub Desktop.
Save aqmattil/2d4df04698168d0e5a3928b111120017 to your computer and use it in GitHub Desktop.
node-rpio test dockerfile
FROM balenalib/raspberrypi3-debian-node:10.20.0-buster-build
# Install other apt deps
RUN apt-get update && apt-get install -y --no-install-recommends
# Move to app dir
WORKDIR /usr/src/app
# Move package.json to filesystem
COPY ./package.json ./
# Install npm modules for the application
RUN JOBS=MAX npm install --unsafe-perm --production && npm cache clean --force \
&& rm -rf /tmp/*
# Move app to filesystem
COPY ./ ./
# Start app
CMD ["npm", "run", "start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment