hey pants guys need some help on selecting the en...
# general
a
hey pants guys need some help on selecting the environment and the registry the idea is having linux and the macOS support for environment ( local dev in macOS , linux in prod ) how do I select the registry to push and the environment to build like
pants package :: --environments-preview=python_310  --docker-registries=prod_registry
something like that pants toml
Copy code
[environments-preview.names]
python_310 = "//:python_310"
macos="//:macos"
[test]
use_coverage = true # to report coverage
output = "all"

[coverage-py]
interpreter_constraints = [">=3.10"]
report = ["html", "console"] # coverage report format


[pytest]
install_from_resolve = "python-default"
requirements = ["pytest-asyncio", "pytest-mock","pytest-cov"]

[docker.registries.prod_registry]
address = "<http://12345678.dkr.ecr.us-west-2.amazonaws.com|12345678.dkr.ecr.us-west-2.amazonaws.com>"
repository = "fdf-urlscan-pipeline-{name}"

[docker.registries.dev]
address = "localhost"
repository = "{name}"  # Simple name for local development
default = true  # Use this by default
Build file
Copy code
python_sources(
    name="url_scraper",
)

pex_binary(
    name="urlscraper_binary",
    dependencies=[":url_scraper"],
    environment=parametrize("python_310", "macos"),
    execution_mode="venv",
    entry_point='some_service.py'
)

docker_image(
    name="urlscraper_image",
    dependencies=[":urlscraper_binary@environment=python_310"],
    image_tags=["latest", "{pants.hash}"],
)