mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-01 17:41:37 +00:00
d064a73131
* Update ci * Use package-lock * Use package-lock.json * Use cache for ci * Enable node18 windows * Revert "Enable node18 windows" This reverts commit e427551acdd64c3a256b48a5b8e86b3c4c986405. * Remove redundant cache * Don't do shrinkwrap * Remove shrinkwrap * Remove redundant step * Cache node-gyp * Debug * Add key * Update ci.yml * Add cache detection * Fix * Add deps * Fix2 * Update caches * Fix ci * Update patsh * Update paths * Update paths * Fix max cache path * Change cache key * Remove spaces * Split caches * Fix linux cache * Fix linux cache * Merge caches * Ignore errs * Find only dirs * Run find after ci * Fix mac cache * Fix caches * Remove env run Co-authored-by: nurikk <ainur@yojee.com>
32 lines
825 B
Docker
32 lines
825 B
Docker
FROM node:16-alpine3.15 as base
|
|
|
|
WORKDIR /app
|
|
RUN apk add --no-cache tzdata eudev tini
|
|
|
|
# Dependencies and build
|
|
FROM base as dependencies_and_build
|
|
|
|
COPY package*.json tsconfig.json index.js ./
|
|
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 && \
|
|
apk del .buildtools
|
|
|
|
# Release
|
|
FROM base as release
|
|
|
|
COPY --from=dependencies_and_build /app/node_modules ./node_modules
|
|
COPY dist ./dist
|
|
COPY package.json LICENSE index.js data/configuration.yaml ./
|
|
|
|
COPY docker/docker-entrypoint.sh /usr/local/bin/
|
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|
|
|
RUN mkdir /app/data
|
|
|
|
ARG COMMIT
|
|
RUN echo "$COMMIT" > dist/.hash
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
CMD [ "/sbin/tini", "--", "node", "index.js"] |