2019-09-30 08:14:20 -07:00
|
|
|
FROM node:10-alpine
|
2018-05-09 13:15:59 -07:00
|
|
|
|
|
|
|
# Copy files
|
|
|
|
ADD . /app
|
|
|
|
RUN cp /app/data/configuration.yaml /app
|
|
|
|
RUN cp /app/docker/run.sh /app
|
|
|
|
RUN chmod +x /app/run.sh
|
|
|
|
WORKDIR /app
|
|
|
|
|
2018-06-15 15:10:08 -07:00
|
|
|
# Write .hash.json
|
|
|
|
ARG COMMIT
|
|
|
|
RUN echo "{\"hash\": \"$COMMIT\"}" > .hash.json
|
|
|
|
|
2018-05-09 13:15:59 -07:00
|
|
|
# Install dependencies
|
2019-10-20 08:17:19 -07:00
|
|
|
RUN apk add --update --no-cache tzdata udev eudev && \
|
2019-09-29 12:32:11 -07:00
|
|
|
apk add --update --no-cache --virtual .buildtools make gcc g++ python linux-headers udev git && \
|
2019-09-17 10:20:52 -07:00
|
|
|
npm install --unsafe-perm --production && \
|
2019-09-29 12:32:11 -07:00
|
|
|
apk del .buildtools
|
2018-05-09 13:15:59 -07:00
|
|
|
|
|
|
|
# Entrypoint
|
|
|
|
ENTRYPOINT ["./run.sh"]
|