Spaces:
Running
Running
File size: 1,056 Bytes
16c5ca1 8bf7d82 fada42e 4b98266 8bf7d82 fada42e 8bf7d82 16c5ca1 8a5f201 61d9dbd 16c5ca1 e85c195 16c5ca1 e4f6d82 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 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"] |