thunderhub/Dockerfile

33 lines
589 B
Docker
Raw Normal View History

# ---------------
# Install Dependencies
# ---------------
FROM node:12-alpine as build
# Install dependencies neccesary for node-gyp on node alpine
RUN apk add --update --no-cache \
python \
make \
g++
# Install app dependencies
COPY package.json .
COPY yarn.lock .
2020-05-07 13:51:39 +02:00
RUN yarn install --silent --prod
RUN yarn add --dev cross-env
# ---------------
# Build App
# ---------------
FROM node:12-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 . .
RUN yarn build
EXPOSE 3000
2020-04-13 07:30:19 +02:00
CMD [ "yarn", "start" ]