-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDockerfile
25 lines (24 loc) · 839 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM node:current-alpine3.12 as build
WORKDIR /usr/src/app
COPY package*.json tsconfig.json ./
RUN npm ci
COPY ./src ./src
RUN npm run build
FROM node:current-alpine3.12 as prod
ARG BUILD_DATE=unknown
ARG BUILD_VERSION=0.0.0-development
ARG VCS_REF=not-set
ENV SONOS2MQTT_RUNNING_IN_CONTAINER=true
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm ci --only=production
COPY --from=build /usr/src/app/lib/*.js /usr/src/app/lib/
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.description="Connecting your sonos speakers to mqtt" \
org.label-schema.name=sonos2mqtt \
org.label-schema.schema-version=1.0 \
org.label-schema.url=https://github.com/svrooij/sonos2mqtt/ \
org.label-schema.version=$BUILD_VERSION \
org.label-schema.vcs-ref=$VCS_REF
EXPOSE 6329
CMD ["node", "./lib/index.js"]