thunderhub/arm64v8.Dockerfile

39 lines
735 B
Docker
Raw Normal View History

2020-05-19 16:38:18 +02:00
# ---------------
# Install Dependencies
2020-05-19 16:38:18 +02:00
# ---------------
FROM arm64v8/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-08-09 16:03:18 +02:00
RUN npm install --silent
# Build the NextJS application
COPY . .
RUN npm run build
# Remove non production necessary modules
RUN npm prune --production
2020-05-12 12:16:44 +02:00
# ---------------
# Build App
# ---------------
FROM arm64v8/node:12.16-alpine
WORKDIR /app
2020-08-09 16:03:18 +02:00
# Copy dependencies and build from build stage
COPY --from=build node_modules node_modules
2020-08-09 16:03:18 +02:00
COPY --from=build .next .next
# Bundle app source
COPY . .
EXPOSE 3000
2020-05-12 12:16:44 +02:00
CMD [ "npm", "start" ]