fix(docker): make proxy optional in dashboard Dockerfiles, strip proxy in VM setup
This commit is contained in:
parent
3b31709b47
commit
2b9fd71740
@ -1,15 +1,17 @@
|
|||||||
FROM node:20-alpine AS builder
|
FROM node:22-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV HTTP_PROXY=http://cso.proxy.att.com:8080/
|
ARG HTTP_PROXY=""
|
||||||
ENV HTTPS_PROXY=http://cso.proxy.att.com:8080/
|
ARG HTTPS_PROXY=""
|
||||||
ENV NO_PROXY=localhost,127.0.0.1
|
ARG NO_PROXY="localhost,127.0.0.1"
|
||||||
|
ENV HTTP_PROXY=${HTTP_PROXY}
|
||||||
|
ENV HTTPS_PROXY=${HTTPS_PROXY}
|
||||||
|
ENV NO_PROXY=${NO_PROXY}
|
||||||
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
|
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||||
ENV NPM_CONFIG_STRICT_SSL=false
|
ENV NPM_CONFIG_STRICT_SSL=false
|
||||||
ENV HUSKY=0
|
ENV HUSKY=0
|
||||||
|
|
||||||
RUN npm config set strict-ssl false \
|
RUN npm config set strict-ssl false \
|
||||||
&& npm config set registry https://jfrog-pkg-proxy.it.att.com/artifactory/api/npm/att-npm-proxy-group/ \
|
|
||||||
&& npm install -g pnpm@10.6.5
|
&& npm install -g pnpm@10.6.5
|
||||||
|
|
||||||
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml tsconfig.base.json ./
|
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml tsconfig.base.json ./
|
||||||
|
|||||||
@ -1,15 +1,17 @@
|
|||||||
FROM node:22-alpine AS builder
|
FROM node:22-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV HTTP_PROXY=http://cso.proxy.att.com:8080/
|
ARG HTTP_PROXY=""
|
||||||
ENV HTTPS_PROXY=http://cso.proxy.att.com:8080/
|
ARG HTTPS_PROXY=""
|
||||||
ENV NO_PROXY=localhost,127.0.0.1
|
ARG NO_PROXY="localhost,127.0.0.1"
|
||||||
|
ENV HTTP_PROXY=${HTTP_PROXY}
|
||||||
|
ENV HTTPS_PROXY=${HTTPS_PROXY}
|
||||||
|
ENV NO_PROXY=${NO_PROXY}
|
||||||
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
|
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||||
ENV NPM_CONFIG_STRICT_SSL=false
|
ENV NPM_CONFIG_STRICT_SSL=false
|
||||||
ENV HUSKY=0
|
ENV HUSKY=0
|
||||||
|
|
||||||
RUN npm config set strict-ssl false \
|
RUN npm config set strict-ssl false \
|
||||||
&& npm config set registry https://jfrog-pkg-proxy.it.att.com/artifactory/api/npm/att-npm-proxy-group/ \
|
|
||||||
&& npm install -g pnpm@10.6.5
|
&& npm install -g pnpm@10.6.5
|
||||||
|
|
||||||
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml tsconfig.base.json ./
|
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml tsconfig.base.json ./
|
||||||
|
|||||||
@ -249,6 +249,27 @@ phase3_clone() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# ── Strip corporate proxy from Dockerfiles ──────────────────────────
|
||||||
|
# Product Dockerfiles have hardcoded AT&T corporate proxy ENVs that
|
||||||
|
# would break builds on any non-corporate network (including Azure VMs).
|
||||||
|
# Strip them since we don't need a proxy on the VM.
|
||||||
|
log " Stripping corporate proxy from Dockerfiles..."
|
||||||
|
local patched=0
|
||||||
|
for df in "${INSTALL_DIR}"/*/backend/Dockerfile "${INSTALL_DIR}"/*/web/Dockerfile "${INSTALL_DIR}"/learning_multimodal_memory_agents/mindlyst-native/web/Dockerfile "${INSTALL_DIR}"/learning_voice_ai_agent/user-dashboard-web/Dockerfile; do
|
||||||
|
[ -f "$df" ] || continue
|
||||||
|
if grep -q 'cso\.proxy\.att\.com' "$df" 2>/dev/null; then
|
||||||
|
# Remove proxy ENV lines and jfrog registry reference
|
||||||
|
sed -i \
|
||||||
|
-e '/HTTP_PROXY=http:\/\/cso\.proxy/d' \
|
||||||
|
-e '/HTTPS_PROXY=http:\/\/cso\.proxy/d' \
|
||||||
|
-e '/NO_PROXY=/d' \
|
||||||
|
-e 's|npm config set registry https://jfrog-pkg-proxy[^ ]* && ||' \
|
||||||
|
"$df"
|
||||||
|
patched=$((patched + 1))
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
ok " Patched ${patched} Dockerfiles (removed corporate proxy)."
|
||||||
|
|
||||||
ok "Phase 3 complete. All repos in ${INSTALL_DIR}/"
|
ok "Phase 3 complete. All repos in ${INSTALL_DIR}/"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user