dazzling-elephant-33766
10/11/2023, 5:09 PMdocker_environment
in order to build a linux compatible image from my MacOS dev machine.
[environments-preview.names]
linux = "//:linux"
macos = "//:macos"
docker = "//:docker"
docker_environment(
name="docker",
platform="linux_arm64",
image="base",
python_bootstrap_search_path=["<PATH>"],
)
docker_image(
name="base",
instructions=[
"FROM --platform=linux/arm64 python:3.11-slim",
"RUN apt update && apt install -y gcc libpq-dev",
],
)
I’ve got a service / pex_binary that uses this docker_environment
pex_binary(
name="gunicorn",
entry_point="gunicorn",
args=["services.a.app.app:create_app()"],
dependencies=["./app", ":files"],
environment=parametrize("linux", "macos"),
)
Is there any way to add my base image as a dependency of docker_environment
? I.e.
docker_environment(
image=":base",
...
)
docker_image(
name="base",
....
)
Right now I have to first do pants package:base
before running pants package services/a:gunicorn
curved-television-6568
10/11/2023, 5:14 PMdazzling-elephant-33766
10/11/2023, 5:14 PM