Skip to content

Commit

Permalink
docker: rebuild serialport from source (Koenkk#15400)
Browse files Browse the repository at this point in the history
* docker: rebuild serialport from source

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

Co-authored-by: Koen Kanters <[email protected]>
  • Loading branch information
zegl and Koenkk authored Dec 7, 2022
1 parent d075f07 commit 83fae81
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ COPY lib ./lib

RUN apk add --no-cache --virtual .buildtools make gcc g++ python3 linux-headers git && \
npm ci --production --no-audit --no-optional --no-update-notifier && \
# Serialport needs to be rebuild for Alpine https://serialport.io/docs/9.x.x/guide-installation#alpine-linux
npm rebuild --build-from-source && \
apk del .buildtools

# Release
Expand All @@ -31,4 +33,4 @@ RUN echo "$COMMIT" > dist/.hash
ENV NODE_ENV production

ENTRYPOINT ["docker-entrypoint.sh"]
CMD [ "/sbin/tini", "--", "node", "index.js"]
CMD [ "/sbin/tini", "--", "node", "index.js"]

0 comments on commit 83fae81

Please sign in to comment.