Skip to content
This repository was archived by the owner on Oct 6, 2020. It is now read-only.

Commit 1f2a18a

Browse files
committed
added a Dockerfile for the automated builds of Docker Hub
1 parent f0e4964 commit 1f2a18a

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Diff for: Dockerfile.automated

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
FROM resin/armv7hf-debian-qemu AS armBin
2+
3+
4+
FROM arm32v6/node:8-alpine as builder
5+
COPY --from=armBin /usr/bin/cross-build-start /usr/bin/
6+
COPY --from=armBin /usr/bin/cross-build-end /usr/bin/
7+
COPY --from=armBin /usr/bin/qemu-arm-static /usr/bin/
8+
COPY --from=armBin /usr/bin/resin-xbuild /usr/bin/
9+
RUN [ "cross-build-start" ]
10+
RUN apk add -U build-base python
11+
WORKDIR /usr/src/app
12+
COPY . /usr/src/app
13+
RUN npm install --production --ignore-scripts --prefer-offline
14+
RUN [ "cross-build-end" ]
15+
16+
17+
FROM arm32v6/node:8-alpine
18+
LABEL maintainer="[email protected]"
19+
LABEL maintainer="[email protected]"
20+
21+
ENV PORT=3000
22+
ENV SSHHOST=localhost
23+
ENV SSHPORT=22
24+
25+
WORKDIR /usr/src/app
26+
ENV NODE_ENV=production
27+
COPY --from=armBin /usr/bin/cross-build-start /usr/bin/
28+
COPY --from=armBin /usr/bin/cross-build-end /usr/bin/
29+
COPY --from=armBin /usr/bin/qemu-arm-static /usr/bin/
30+
COPY --from=armBin /usr/bin/resin-xbuild /usr/bin/
31+
RUN [ "cross-build-start" ]
32+
RUN apk add -U openssh-client sshpass
33+
COPY --from=builder /usr/src/app/dist /usr/src/app/dist
34+
COPY --from=builder /usr/src/app/node_modules /usr/src/app/node_modules
35+
COPY package.json /usr/src/app
36+
COPY index.js /usr/src/app
37+
RUN mkdir ~/.ssh
38+
RUN ssh-keyscan -H wetty-ssh >> ~/.ssh/known_hosts
39+
RUN [ "cross-build-end" ]
40+
EXPOSE $PORT
41+
42+
ENTRYPOINT [ "node", "." ]

0 commit comments

Comments
 (0)