Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add proxy configuration

Đang mở
#75 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
docker, python
Lĩnh vực
build-system, devops

Hướng nghiên cứu

Bắt đầu từ điểm vào cfn submit và phương thức _docker_build trong codegen.py. Xác nhận hành vi build Docker khi một proxy được cấu hình, và coi issue là hoàn tất khi cfn submit thành công thông qua cấu hình proxy đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement help wanted p2

cfn submit doesn't seem to work if a proxy is configured. Adding use_config_proxy to the _docker_build method in codegen.py shown below seems to resolve the issue.

@classmethod
def _docker_build(cls, external_path):
    cls._check_for_support_lib_sdist(external_path)

    internal_path = PurePosixPath("/project")
    command = " ".join(cls._make_pip_command(internal_path))
    LOG.debug("command is '%s'", command)

    volumes = {str(external_path): {"bind": str(internal_path), "mode": "rw"}}
    image = f"lambci/lambda:build-{cls.RUNTIME}"
    LOG.warning(
        "Starting Docker build. This may take several minutes if the "
        "image '%s' needs to be pulled first.",
        image,
    )
    docker_client = docker.from_env()
    try:
        logs = docker_client.containers.run(
            image=image,
            command=command,
            auto_remove=True,
            volumes=volumes,
            stream=True,
            use_config_proxy=True   #<=== use proxy configuration if specified in config.json
        )
Ngôn ngữ chính
Python
Star
107
Fork
46
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws-cloudformation/cloudformation-cli-python-plugin

Tất cả issue của aws-cloudformation/cloudformation-cli-python-plugin

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.