fix: updated bun in docker file

Signed-off-by: Varun Raj <mailme@varunraj.in>
This commit is contained in:
Varun Raj committed 2024-08-18 20:48:28 +05:30
1 parent 2c9a33e919
commit 3d833c48f5
2 files changed
+11 -14

No files matched your search

+10 -13
View File
@@ -1,23 +1,20 @@
# Use an official Node.js runtime as the base image # docker/dev.Dockerfile
FROM node:18-alpine FROM oven/bun:latest
# Set the working directory in the container WORKDIR /app/next-app
WORKDIR /app
# Copy package.json and package-lock.json to the working directory COPY package.json ./
COPY package*.json ./ COPY bun.lockb ./
# Install dependencies RUN bun install
RUN npm ci
# Copy the rest of the application code
COPY . . COPY . .
# Build the Next.js application ENV NEXT_TELEMETRY_DISABLED=1
RUN npm run build
RUN bun next build
# Expose the port that Next.js uses
EXPOSE 3000 EXPOSE 3000
# Set the command to run the application # Set the command to run the application
CMD ["npm", "start"] CMD ["bun", "run", "start"]
+1 -1
View File
@@ -85,7 +85,7 @@ export default function PeopleList() {
return ( return (
<div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-4 p-2"> <div className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-4 p-2">
{people.map((person) => ( {people.map((person) => (
<PersonItem person={person} /> <PersonItem person={person} key={person.id}/>
))} ))}
</div> </div>
) )