Added Dockerfile
This commit is contained in:
parent
4b04d9a2f9
commit
9bdb170000
2 changed files with 31 additions and 0 deletions
2
.dockerignore
Normal file
2
.dockerignore
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
.git
|
||||
node_modules
|
||||
29
Dockerfile
Normal file
29
Dockerfile
Normal file
|
|
@ -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/
|
||||
|
||||
Loading…
Add table
Reference in a new issue