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

Commit

Permalink
added a Dockerfile for the automated builds of Docker Hub
Browse files Browse the repository at this point in the history
  • Loading branch information
mammo0 committed Dec 23, 2018
1 parent f9b6845 commit 9d170b3
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions Dockerfile.automated
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM resin/armv7hf-debian-qemu AS armBin


FROM arm32v6/node:8-alpine as builder
WORKDIR /usr/src/app
COPY --from=armBin /usr/bin/cross-build-start /usr/bin/
COPY --from=armBin /usr/bin/cross-build-end /usr/bin/
COPY --from=armBin /usr/bin/qemu-arm-static /usr/bin/
COPY --from=armBin /usr/bin/resin-xbuild /usr/bin/
RUN [ "cross-build-start" ]
RUN apk add --update build-base python
COPY . /usr/src/app
RUN yarn
RUN [ "cross-build-end" ]


FROM arm32v6/node:8-alpine
MAINTAINER [email protected]
MAINTAINER [email protected]

ENV PORT=3000
ENV SSHHOST=localhost
ENV SSHPORT=22

WORKDIR /app
COPY --from=armBin /usr/bin/cross-build-start /usr/bin/
COPY --from=armBin /usr/bin/cross-build-end /usr/bin/
COPY --from=armBin /usr/bin/qemu-arm-static /usr/bin/
COPY --from=armBin /usr/bin/resin-xbuild /usr/bin/
RUN [ "cross-build-start" ]
RUN adduser -D -h /home/term -s /bin/sh term && \
( echo "term:term" | chpasswd ) && \
apk add openssh-client && \
apk add sshpass
USER term
EXPOSE $PORT
COPY --from=builder /usr/src/app /app
RUN mkdir ~/.ssh
RUN [ "cross-build-end" ]
CMD ssh-keyscan -H wetty-ssh >> ~/.ssh/known_hosts && node bin

0 comments on commit 9d170b3

Please sign in to comment.