[#1] 增加内置构建选项,使用内网apt源
This commit is contained in:
@@ -3,6 +3,18 @@ FROM docker.elastic.co/elasticsearch/elasticsearch:8.13.4
|
||||
# 切换到 root 用户进行系统级安装
|
||||
USER root
|
||||
|
||||
# 设置构建参数
|
||||
ARG USE_INTRANET=false
|
||||
|
||||
# 配置内网 apt 源 (如果指定了内网选项)
|
||||
RUN if [ "$USE_INTRANET" = "true" ]; then \
|
||||
echo "Configuring intranet apt sources..." && \
|
||||
cp /etc/apt/sources.list /etc/apt/sources.list.bak && \
|
||||
echo "deb [trusted=yes] https://10.92.132.52/mirrors/ubuntu2204/ jammy main" > /etc/apt/sources.list && \
|
||||
echo 'Acquire::https::Verify-Peer "false";' > /etc/apt/apt.conf.d/99disable-ssl-check && \
|
||||
echo 'Acquire::https::Verify-Host "false";' >> /etc/apt/apt.conf.d/99disable-ssl-check; \
|
||||
fi
|
||||
|
||||
# 安装 supervisor
|
||||
RUN apt-get update && \
|
||||
apt-get install -y supervisor && \
|
||||
|
||||
Reference in New Issue
Block a user