mirror of
https://github.com/open-webui/open-webui
synced 2024-11-07 00:59:52 +00:00
Merge pull request #5919 from Nowheresly/dockerwarn
refac: remove docker warnings during image build
This commit is contained in:
commit
4ca870bf6d
@ -17,7 +17,7 @@ ARG UID=0
|
|||||||
ARG GID=0
|
ARG GID=0
|
||||||
|
|
||||||
######## WebUI frontend ########
|
######## WebUI frontend ########
|
||||||
FROM --platform=$BUILDPLATFORM node:21-alpine3.19 as build
|
FROM --platform=$BUILDPLATFORM node:21-alpine3.19 AS build
|
||||||
ARG BUILD_HASH
|
ARG BUILD_HASH
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@ -30,7 +30,7 @@ ENV APP_BUILD_HASH=${BUILD_HASH}
|
|||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
######## WebUI backend ########
|
######## WebUI backend ########
|
||||||
FROM python:3.11-slim-bookworm as base
|
FROM python:3.11-slim-bookworm AS base
|
||||||
|
|
||||||
# Use args
|
# Use args
|
||||||
ARG USE_CUDA
|
ARG USE_CUDA
|
||||||
@ -82,7 +82,7 @@ ENV HF_HOME="/app/backend/data/cache/embedding/models"
|
|||||||
|
|
||||||
WORKDIR /app/backend
|
WORKDIR /app/backend
|
||||||
|
|
||||||
ENV HOME /root
|
ENV HOME=/root
|
||||||
# Create user and group if not root
|
# Create user and group if not root
|
||||||
RUN if [ $UID -ne 0 ]; then \
|
RUN if [ $UID -ne 0 ]; then \
|
||||||
if [ $GID -ne 0 ]; then \
|
if [ $GID -ne 0 ]; then \
|
||||||
@ -161,6 +161,6 @@ USER $UID:$GID
|
|||||||
|
|
||||||
ARG BUILD_HASH
|
ARG BUILD_HASH
|
||||||
ENV WEBUI_BUILD_VERSION=${BUILD_HASH}
|
ENV WEBUI_BUILD_VERSION=${BUILD_HASH}
|
||||||
ENV DOCKER true
|
ENV DOCKER=true
|
||||||
|
|
||||||
CMD [ "bash", "start.sh"]
|
CMD [ "bash", "start.sh"]
|
||||||
|
Loading…
Reference in New Issue
Block a user