-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile-qemu-arm7
53 lines (42 loc) · 1.13 KB
/
Dockerfile-qemu-arm7
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#FROM resin/raspberrypi2-debian AS base
FROM thann/armv7hf-debian-qemu AS base
EXPOSE 3000
ENTRYPOINT ["node"]
CMD ["server"]
HEALTHCHECK --start-period=5s \
CMD curl --fail localhost:3000/api/v1/health || exit 1
RUN [ "cross-build-start" ]
# Create app directory
RUN mkdir -p /usr/src/app/dist
WORKDIR /usr/src/app
COPY package.json \
package-lock.json \
/usr/src/app/
# Install updates
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && \
apt update && \
apt upgrade -y && \
apt install nodejs
# Install build dependencies
FROM base AS build
RUN apt install git python make g++
# Install app dependencies
RUN npm install
# Make app
FROM base
COPY --from=build /usr/src/app/node_modules /usr/src/app/node_modules
# Bundle app source
COPY dist/favicon* /usr/src/app/dist/
COPY migrations /usr/src/app/migrations
COPY lib /usr/src/app/lib
COPY api /usr/src/app/api
COPY webapp /usr/src/app/webapp
COPY test /usr/src/app/test
COPY server.js \
door.js \
webpack.config.js \
.eslintrc.json \
/usr/src/app/
# Build webapp
RUN node_modules/.bin/webpack
RUN [ "cross-build-end" ]