mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-22 14:22:33 +01:00
33 lines
No EOL
589 B
Docker
33 lines
No EOL
589 B
Docker
# ---------------
|
|
# 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 .
|
|
RUN yarn install --silent --prod
|
|
RUN yarn add --dev cross-env
|
|
|
|
# ---------------
|
|
# Build App
|
|
# ---------------
|
|
FROM node:12-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy dependencies from build stage
|
|
COPY --from=build node_modules node_modules
|
|
|
|
# Bundle app source
|
|
COPY . .
|
|
RUN yarn build
|
|
EXPOSE 3000
|
|
|
|
CMD [ "yarn", "start" ] |