Skip to content

Commit

Permalink
Dockerize. Koenkk#5
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Apr 26, 2018
1 parent 06c3d60 commit f3044ed
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 20 deletions.
13 changes: 13 additions & 0 deletions docker/amd64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:9

# Copy files
ADD . /app
RUN cp /app/data/configuration.yaml /app
RUN cp /app/docker/start.sh /app
RUN chmod +x /app/start.sh

WORKDIR /app
RUN npm install

# Entrypoint
ENTRYPOINT ["./start.sh"]
16 changes: 0 additions & 16 deletions docker/arm32v7/Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions docker/arm32v7/build.sh

This file was deleted.

24 changes: 24 additions & 0 deletions docker/armv7hf/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM resin/armv7hf-debian

RUN [ "cross-build-start" ]

# Install nodejs and git
RUN curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
RUN apt-get update && apt-get install -y git nodejs make g++ && rm -rf /var/lib/apt/lists/*

# Copy files
ADD . /app
RUN cp /app/data/configuration.yaml /app
RUN cp /app/docker/start.sh /app
RUN chmod +x /app/start.sh

WORKDIR /app
RUN npm install

# Cleanup
RUN apt-get purge g++ make && apt-get autoremove && rm -rf /var/lib/apt/lists/*

RUN [ "cross-build-end" ]

# Entrypoint
ENTRYPOINT ["./start.sh"]
4 changes: 4 additions & 0 deletions docker/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

cp -n /app/configuration.yaml /app/data/configuration.yaml
npm start

0 comments on commit f3044ed

Please sign in to comment.