webos / Dockerfile
wuhenba's picture
Update Dockerfile
8bf7d82
FROM debian:trixie-slim
# 1. 安装 locales 并在安装列表中增加 locales
RUN apt-get update && \
apt-get install -y \
sudo \
curl \
wget \
procps \
psmisc \
iputils-ping \
net-tools \
iproute2 \
dnsutils \
vim \
nano \
unzip \
zip \
less \
ca-certificates \
locales && \
# 2. 生成 en_US.UTF-8 语言包
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen && \
# 3. 创建用户及后续操作
useradd -m -u 1000 user && \
echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user && \
chmod 0440 /etc/sudoers.d/user && \
rm -rf /var/lib/apt/lists/*
# 4. 设置环境变量,确保系统默认使用生成的语言包
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
USER user
ENV WEBOS_PORT="7860"
ENV WEBOS_DATA_DIR="/app"
ENV SHELL="/bin/bash"
WORKDIR /app
COPY --chown=user ["./webos", "./webos.db", "/app/"]
RUN chmod +x webos
CMD ["/app/webos"]