thunderhub/Dockerfile

32 lines
581 B
Text
Raw Normal View History

2020-05-19 16:38:18 +02:00
# ---------------
# Install Dependencies
2020-05-19 16:38:18 +02:00
# ---------------
FROM node:12.16-alpine as build
# Install dependencies neccesary for node-gyp on node alpine
2020-05-19 16:38:18 +02:00
RUN apk add --update --no-cache \
python \
make \
g++
# Install app dependencies
COPY package.json .
COPY package-lock.json .
2020-05-12 12:16:44 +02:00
RUN npm install --production --silent
# ---------------
# Build App
# ---------------
FROM node:12.16-alpine
2020-05-07 13:51:39 +02:00
WORKDIR /app
# Copy dependencies from build stage
COPY --from=build node_modules node_modules
# Bundle app source
COPY . .
2020-05-12 12:16:44 +02:00
RUN npm run build
EXPOSE 3000
2020-04-13 07:30:19 +02:00
2020-05-12 12:16:44 +02:00
CMD [ "npm", "start" ]