cgoodmaker commited on
Commit
076039f
·
1 Parent(s): b419917

Fix Dockerfile: install curl before using it for NodeSource setup

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -7,13 +7,14 @@ ENV PATH="/home/user/.local/bin:$PATH"
7
 
8
  WORKDIR /app
9
 
10
- # Install Node.js for building the React frontend
11
  RUN apt-get update && \
 
12
  curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
13
- apt-get install -y nodejs curl && \
14
  rm -rf /var/lib/apt/lists/*
15
 
16
- # Install Python dependencies as root (faster) then hand off to user
17
  COPY --chown=user requirements.txt ml-requirements.txt
18
  COPY --chown=user backend/requirements.txt api-requirements.txt
19
  RUN pip install --no-cache-dir -r ml-requirements.txt -r api-requirements.txt
 
7
 
8
  WORKDIR /app
9
 
10
+ # Install curl first, then use it to add the NodeSource repo, then install Node.js
11
  RUN apt-get update && \
12
+ apt-get install -y curl && \
13
  curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
14
+ apt-get install -y nodejs && \
15
  rm -rf /var/lib/apt/lists/*
16
 
17
+ # Install Python dependencies
18
  COPY --chown=user requirements.txt ml-requirements.txt
19
  COPY --chown=user backend/requirements.txt api-requirements.txt
20
  RUN pip install --no-cache-dir -r ml-requirements.txt -r api-requirements.txt