-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: updated dockerfile and revived docker functionality (#304)
Co-authored-by: Sanchit Bajaj <[email protected]>
- Loading branch information
1 parent
af2e390
commit bf2ff2b
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
FROM node:18 as builder | ||
|
||
FROM node:alpine | ||
WORKDIR /app | ||
|
||
# Update npm | ||
RUN npm install -g npm@latest | ||
COPY next.config.js . | ||
COPY package.json . | ||
COPY postcss.config.js . | ||
COPY tailwind.config.js . | ||
COPY tsconfig.json . | ||
COPY yarn.lock . | ||
|
||
# Install app dependencies | ||
COPY ["package.json", "yarn.lock*", "./"] | ||
#RUN npm install | ||
RUN yarn install | ||
|
||
# Copy source code | ||
COPY . . | ||
|
||
#RUN npm run build | ||
RUN yarn build | ||
EXPOSE 3000 | ||
|
||
# Create a non-root user and switch to it | ||
# RUN chown -R node /app | ||
# USER node | ||
|
||
# Command to run on container start | ||
CMD ["yarn", "dev"] | ||
CMD ["yarn","start"] |