File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7373 platforms : linux/amd64,linux/arm64
7474 cache-from : type=gha
7575 cache-to : type=gha,mode=max
76+ build-args : |
77+ PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/
78+ UV_DEFAULT_INDEX=https://mirrors.aliyun.com/pypi/simple/
79+ npm_config_registry=https://registry.npmmirror.com
7680 tags : |
7781 ${{ env.PUSH_LATEST == 'true' && format('{0}/mcp-gateway-allinone:latest', env.DOCKER_HUB_USERNAME) || '' }}
7882 ${{ format('{0}/mcp-gateway-allinone:{1}', env.DOCKER_HUB_USERNAME, github.ref_name) }}
Original file line number Diff line number Diff line change @@ -42,10 +42,18 @@ RUN npm run build
4242
4343FROM ubuntu:22.04
4444
45- # Set default timezone
4645ENV TZ=UTC
4746ENV DEBIAN_FRONTEND=noninteractive
4847
48+ # Define ARGs for package sources
49+ ARG PIP_INDEX_URL=https://pypi.org/simple
50+ ARG UV_DEFAULT_INDEX=https://pypi.org/simple
51+ ARG npm_config_registry=https://registry.npmjs.org/
52+
53+ ENV PIP_INDEX_URL=${PIP_INDEX_URL} \
54+ UV_DEFAULT_INDEX=${UV_DEFAULT_INDEX} \
55+ npm_config_registry=${npm_config_registry}
56+
4957# Install essential packages and setup timezone
5058RUN apt-get update && apt-get install -y \
5159 supervisor \
@@ -76,6 +84,11 @@ RUN python3 -m pip install pipx && \
7684# Install uv
7785RUN python3 -m pip install uv
7886
87+ # Configure pip and npm to use the specified repositories
88+ RUN mkdir -p /root/.config/pip && \
89+ echo -e "[global]\n index-url = ${PIP_INDEX_URL}" > /root/.config/pip/pip.conf && \
90+ npm config set registry ${npm_config_registry} -g
91+
7992COPY deploy/docker/allinone/supervisord.conf /etc/supervisor/conf.d/
8093COPY deploy/docker/allinone/nginx.conf /etc/nginx/nginx.conf
8194RUN mkdir -p /app/data
You can’t perform that action at this time.
0 commit comments