zigbee2mqtt/docker/Dockerfile

31 lines
608 B
Docker
Raw Normal View History

FROM node:10-alpine as base
2018-05-09 13:15:59 -07:00
WORKDIR /app
RUN apk add --no-cache tzdata eudev
2018-05-09 13:15:59 -07:00
COPY package.json .
2018-06-15 15:10:08 -07:00
# Dependencies
FROM base as dependencies
COPY npm-shrinkwrap.json .
RUN apk add --no-cache --virtual .buildtools make gcc g++ python linux-headers git && \
npm install --production && \
apk del .buildtools
2018-05-09 13:15:59 -07:00
# Release
FROM base as release
COPY --from=dependencies /app/node_modules ./node_modules
COPY lib ./lib
COPY index.js docker/run.sh data/configuration.yaml ./
RUN chmod +x /app/run.sh
RUN mkdir /app/data
ARG COMMIT
RUN echo "{\"hash\": \"$COMMIT\"}" > .hash.json
2018-05-09 13:15:59 -07:00
ENTRYPOINT ["./run.sh"]