Specify profile for docker compose in config
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 50/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- docker, docker-compose, javascript
- Lĩnh vực
- devops
Hướng nghiên cứu
Bắt đầu bằng cách lần theo cách plugin đọc config.docker tùy chỉnh và tạo lệnh docker compose up. Thêm hỗ trợ cho giá trị profile hoặc profiles tùy chọn, sau đó kiểm tra bằng một tệp Compose chứa các profile local và test để chỉ profile được chọn được khởi động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
I have multiple profiles configured in my docker-compose.yml file. I would like to only run the containers tagged with a particular profile with via this plugin's docker compose up command.
Example
Example compose file:
# docker-compose.yml
services:
localstack:
profiles:
- local
container_name: '${LOCALSTACK_DOCKER_NAME:-localstack-main}'
image: localstack/localstack
ports:
- 4566:4566 # LocalStack Gateway
- 4510-4559:4510-4559 # external services port range
environment:
# LocalStack configuration: https://docs.localstack.cloud/references/configuration/
- DEBUG=${DEBUG:-0}
volumes:
- '${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack'
- '/var/run/docker.sock:/var/run/docker.sock'
redis-local:
profiles:
- local
image: redis:7.2.4-alpine
ports:
- 6379:6379
command: redis-server --logLevel notice --requirepass pass
redis-test:
profiles:
- test
image: redis:7.2.4-alpine
ports:
- 6379:6379
command: redis-server --logLevel notice --requirepass pass
And the compose up command:
docker compose --profile local up -f docker-compose.yml
Read more about compose profiles here.
When specifying the local profile it shouldn't create the redis-test container.
Suggested solution
Can add an optional parameter to config.docker to specify the profile(s) to be run in the docker compose up command.
e.g.
custom:
localstack:
docker:
profiles:
- local
- Ngôn ngữ chính
- JavaScript
- Star
- 542
- Fork
- 92
- 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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của localstack/serverless-localstack
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 25/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
-
Support for Python 3.13 Lambdas Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Serverless deploy to LocalStack fails: “Invalid character in header content [authorization]” Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
-
Static API Gateway V1 Endpoints Đang mởaws:apigateway status: backlog
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
localstack/serverless-localstack#270 · 3 reaction ·
Tất cả issue của localstack/serverless-localstack
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Theme loads third-party resources on every page (jsdelivr web font, cdnjs Font Awesome) – GDPR Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
nightscout/nocturne#1414 ·
-
bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/inspector#2458 · 1 bình luận ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
carbon-design-system/ibm-products#9907 ·