Skip to content

Commit bf2ff2b

Browse files
feat: updated dockerfile and revived docker functionality (#304)
Co-authored-by: Sanchit Bajaj <55249639+Sanchitbajaj02@users.noreply.github.com>
1 parent af2e390 commit bf2ff2b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Dockerfile

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
FROM node:18 as builder
2-
1+
FROM node:alpine
32
WORKDIR /app
4-
5-
# Update npm
6-
RUN npm install -g npm@latest
3+
COPY next.config.js .
4+
COPY package.json .
5+
COPY postcss.config.js .
6+
COPY tailwind.config.js .
7+
COPY tsconfig.json .
8+
COPY yarn.lock .
79

810
# Install app dependencies
9-
COPY ["package.json", "yarn.lock*", "./"]
11+
#RUN npm install
1012
RUN yarn install
1113

12-
# Copy source code
1314
COPY . .
14-
15+
#RUN npm run build
16+
RUN yarn build
1517
EXPOSE 3000
16-
1718
# Create a non-root user and switch to it
1819
# RUN chown -R node /app
1920
# USER node
20-
2121
# Command to run on container start
22-
CMD ["yarn", "dev"]
22+
CMD ["yarn","start"]

0 commit comments

Comments
 (0)