From 15eded8e237822396b90a395a3f1b0949ed1cb36 Mon Sep 17 00:00:00 2001 From: aki-yutian Date: Sat, 11 Jan 2025 22:11:20 +0800 Subject: [PATCH] Revert "add proxy for china base host" This reverts commit 3458955883edb76f3178a3a06249c01f33f4e25a. --- Makefile | 20 +++++--------------- api/Dockerfile | 22 ---------------------- web/Dockerfile | 21 --------------------- 3 files changed, 5 insertions(+), 58 deletions(-) diff --git a/Makefile b/Makefile index 7f22959ad2..ff61a00313 100644 --- a/Makefile +++ b/Makefile @@ -1,28 +1,18 @@ # Variables -DOCKER_REGISTRY=akiyu303 -WEB_IMAGE=$(DOCKER_REGISTRY)/lefeng-web -API_IMAGE=$(DOCKER_REGISTRY)/lefeng-api +DOCKER_REGISTRY=langgenius +WEB_IMAGE=$(DOCKER_REGISTRY)/dify-web +API_IMAGE=$(DOCKER_REGISTRY)/dify-api VERSION=latest # Build Docker images build-web: @echo "Building web Docker image: $(WEB_IMAGE):$(VERSION)..." - docker build \ - --build-arg HTTP_PROXY=http://host.docker.internal:1081 \ - --build-arg HTTPS_PROXY=http://host.docker.internal:1081 \ - --build-arg NO_PROXY=localhost,127.0.0.1 \ - --add-host=host.docker.internal:host-gateway \ - -t $(WEB_IMAGE):$(VERSION) ./web + docker build -t $(WEB_IMAGE):$(VERSION) ./web @echo "Web Docker image built successfully: $(WEB_IMAGE):$(VERSION)" build-api: @echo "Building API Docker image: $(API_IMAGE):$(VERSION)..." - docker build \ - --build-arg HTTP_PROXY=http://host.docker.internal:1081 \ - --build-arg HTTPS_PROXY=http://host.docker.internal:1081 \ - --build-arg NO_PROXY=localhost,127.0.0.1 \ - --add-host=host.docker.internal:host-gateway \ - -t $(API_IMAGE):$(VERSION) ./api + docker build -t $(API_IMAGE):$(VERSION) ./api @echo "API Docker image built successfully: $(API_IMAGE):$(VERSION)" # Push Docker images diff --git a/api/Dockerfile b/api/Dockerfile index fb9224b00f..df676f1926 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -1,14 +1,6 @@ # base image FROM python:3.12-slim-bookworm AS base -# Add proxy configuration -ARG HTTP_PROXY -ARG HTTPS_PROXY -ARG NO_PROXY -ENV HTTP_PROXY=${HTTP_PROXY} -ENV HTTPS_PROXY=${HTTPS_PROXY} -ENV NO_PROXY=${NO_PROXY} - WORKDIR /app/api # Install Poetry @@ -27,10 +19,6 @@ ENV POETRY_VIRTUALENVS_CREATE=true ENV POETRY_REQUESTS_TIMEOUT=15 FROM base AS packages -# Inherit proxy settings from base -ENV HTTP_PROXY=${HTTP_PROXY} -ENV HTTPS_PROXY=${HTTPS_PROXY} -ENV NO_PROXY=${NO_PROXY} # if you located in China, you can use aliyun mirror to speed up # RUN sed -i 's@deb.debian.org@mirrors.aliyun.com@g' /etc/apt/sources.list.d/debian.sources @@ -42,18 +30,8 @@ RUN apt-get update \ COPY pyproject.toml poetry.lock ./ RUN poetry install --sync --no-cache --no-root -FROM base AS builder -# Inherit proxy settings from base -ENV HTTP_PROXY=${HTTP_PROXY} -ENV HTTPS_PROXY=${HTTPS_PROXY} -ENV NO_PROXY=${NO_PROXY} - # production stage FROM base AS production -# Inherit proxy settings from base -ENV HTTP_PROXY=${HTTP_PROXY} -ENV HTTPS_PROXY=${HTTPS_PROXY} -ENV NO_PROXY=${NO_PROXY} ENV FLASK_APP=app.py ENV EDITION=SELF_HOSTED diff --git a/web/Dockerfile b/web/Dockerfile index 01ef3c09e2..6118adbca4 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -2,14 +2,6 @@ FROM node:20-alpine3.20 AS base LABEL maintainer="takatost@gmail.com" -# Add proxy configuration -ARG HTTP_PROXY -ARG HTTPS_PROXY -ARG NO_PROXY -ENV HTTP_PROXY=${HTTP_PROXY} -ENV HTTPS_PROXY=${HTTPS_PROXY} -ENV NO_PROXY=${NO_PROXY} - # if you located in China, you can use aliyun mirror to speed up # RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories @@ -18,10 +10,6 @@ RUN apk add --no-cache tzdata # install packages FROM base AS packages -# Inherit proxy settings from base -ENV HTTP_PROXY=${HTTP_PROXY} -ENV HTTPS_PROXY=${HTTPS_PROXY} -ENV NO_PROXY=${NO_PROXY} WORKDIR /app/web @@ -35,11 +23,6 @@ RUN yarn install --frozen-lockfile # build resources FROM base AS builder -# Inherit proxy settings from base -ENV HTTP_PROXY=${HTTP_PROXY} -ENV HTTPS_PROXY=${HTTPS_PROXY} -ENV NO_PROXY=${NO_PROXY} - WORKDIR /app/web COPY --from=packages /app/web/ . COPY . . @@ -49,10 +32,6 @@ RUN yarn build # production stage FROM base AS production -# Inherit proxy settings from base -ENV HTTP_PROXY=${HTTP_PROXY} -ENV HTTPS_PROXY=${HTTPS_PROXY} -ENV NO_PROXY=${NO_PROXY} ENV NODE_ENV=production ENV EDITION=SELF_HOSTED