-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (29 loc) · 769 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Use node alpine as it's a small node image
FROM node:16-alpine
ARG ACCESS_USERNAME
ARG ACCESS_PASSWORD
ARG API_BASE_URI
ARG API_USERNAME
ARG API_PASSWORD
ARG NEXTAUTH_SECRET
ARG NEXTAUTH_URL
ARG NEXT_PUBLIC_BASE_PATH
RUN npm install -g pnpm
# Create the directory on the node image
# where our Next.js app will live
RUN mkdir -p /app
# Set /app as the working directory
WORKDIR /app
# Copy package.json and package-lock.json
# to the /app working directory
COPY package.json pnpm-lock.yaml /app/
# Install dependencies in /app
RUN pnpm install
# Copy the rest of our Next.js folder into /app
COPY . /app
# Ensure port 3000 is accessible to our system
EXPOSE 3000
# Build
RUN pnpm build
# Run yarn dev, as we would via the command line
CMD ["pnpm", "start"]