-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.arm64v8
34 lines (29 loc) · 1.12 KB
/
Dockerfile.arm64v8
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
26
27
28
29
30
31
32
33
34
FROM node:current-alpine AS build
#QEMU Download
ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-aarch64.tar.gz
RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1
# Build Nodejs Application
WORKDIR /usr/src/app
COPY package*.json tsconfig.json ./
RUN npm ci
COPY ./src ./src
RUN npm run build
FROM arm64v8/node:current-alpine as prod
# Add QEMU
COPY --from=build qemu-aarch64-static /usr/bin
ARG BUILD_DATE=unknown
ARG BUILD_VERSION=0.0.0-development
ARG VCS_REF=not-set
ENV MUSICCAST2MQTT_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 musiccast speakers to mqtt" \
org.label-schema.name=musiccast2mqtt \
org.label-schema.schema-version=1.0 \
org.label-schema.url=https://github.com/jonaseickhoff/musiccast2mqtt/ \
org.label-schema.version=$BUILD_VERSION \
org.label-schema.vcs-ref=$VCS_REF
CMD ["node", "./lib/index.js"]