Skip to content

Commit

Permalink
Added Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Thann committed Aug 3, 2018
1 parent 4b04d9a commit 9bdb170
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.git
node_modules
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM base/archlinux:latest AS base

RUN mkdir -p /code
WORKDIR /code
CMD "hsd"

RUN pacman -Sy --noconfirm archlinux-keyring && \
pacman -Syu --noconfirm nodejs unbound && \
rm /var/cache/pacman/pkg/*

COPY package.json \
#package-lock.json \
/code/

FROM base AS build
# Install build dependencies
RUN pacman -Syu --noconfirm base-devel unrar git python2 npm
#HACK: Node-gyp needs python
RUN ln -s /usr/bin/python2 /usr/bin/python

# Install hsd
RUN npm install --production

FROM base
ENV PATH="${PATH}:/code/bin:/code/node_modules/.bin"
COPY --from=build /code/node_modules /code/node_modules/
COPY bin /code/bin/
COPY lib /code/lib/

0 comments on commit 9bdb170

Please sign in to comment.