File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM python:3.12
1+ FROM python:3.14
22ENV PYTHONUNBUFFERED=1
33
44WORKDIR /code
@@ -12,6 +12,9 @@ COPY requirements.txt /code/requirements.txt
1212
1313RUN pip install --no-cache-dir -r requirements.txt
1414
15+ RUN groupadd --system appgroup && useradd --system --gid appgroup appuser \
16+ && chown -R appuser:appgroup /code
17+
1518COPY entrypoint.sh /
1619RUN chmod +x /entrypoint.sh
1720
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ WORKDIR /app
55ARG BACKEND_URL
66ENV BACKEND_URL=${BACKEND_URL}
77
8- COPY package.json ./
9- RUN npm install
8+ COPY package.json package-lock.json ./
9+ RUN npm ci
1010
1111COPY . .
1212RUN npm run build
@@ -26,5 +26,9 @@ COPY --from=build /app/.next/standalone ./
2626COPY --from=build /app/.next/static ./.next/static
2727COPY --from=build /app/public ./public
2828
29+ RUN addgroup -S appgroup && adduser -S appuser -G appgroup \
30+ && chown -R appuser:appgroup /app
31+
32+ USER appuser
2933EXPOSE ${PORT}
3034CMD ["node", "server.js"]
You can’t perform that action at this time.
0 commit comments