Rajhuggingface4253 commited on
Commit
fe427e7
·
1 Parent(s): 89a7fef

dockerfile bugs fixed

Browse files
Files changed (1) hide show
  1. dockerfile +9 -6
dockerfile CHANGED
@@ -1,11 +1,14 @@
1
- # Use the official sharp base image, which has all dependencies pre-installed.
2
- # The 'sharp-node' images are maintained by the sharp library's author.
3
- FROM lovell/sharp-node:v0.32.0-node18-buster
4
 
5
- # Set the working directory inside the container.
 
 
 
 
6
  WORKDIR /usr/src/app
7
 
8
- # Copy the dependency files first to leverage Docker's caching.
9
  COPY package*.json ./
10
 
11
  # Install Node.js dependencies.
@@ -17,5 +20,5 @@ COPY . .
17
  # Expose the port your app runs on.
18
  EXPOSE 3000
19
 
20
- # The command that starts your application.
21
  CMD [ "node", "server.js" ]
 
1
+ # Use the Node.js base image.
2
+ FROM node:20-slim
 
3
 
4
+ # Install system dependencies.
5
+ # The --no-install-recommends flag prevents a lot of unnecessary packages from being installed, which can cause issues.
6
+ RUN apt-get update && apt-get install -y --no-install-recommends libheif-dev libavif-dev libheif-examples
7
+
8
+ # Set the working directory.
9
  WORKDIR /usr/src/app
10
 
11
+ # Copy the dependency files.
12
  COPY package*.json ./
13
 
14
  # Install Node.js dependencies.
 
20
  # Expose the port your app runs on.
21
  EXPOSE 3000
22
 
23
+ # Command to run the application.
24
  CMD [ "node", "server.js" ]