ripe-gigabyte-88964
12/05/2023, 6:57 PMcurved-television-6568
12/05/2023, 7:00 PMripe-gigabyte-88964
12/05/2023, 7:17 PM--cache-from
and --cache-to
in pants? Or does it just use whatever's configured for docker? I'm struggling to find how to configure these in docker outside of command line arguments.curved-television-6568
12/05/2023, 7:20 PMcurved-television-6568
12/05/2023, 7:22 PMripe-gigabyte-88964
12/05/2023, 7:24 PMcurved-television-6568
12/05/2023, 7:25 PMripe-gigabyte-88964
12/05/2023, 7:32 PMcurved-television-6568
12/05/2023, 7:33 PMdocker_image
target, pants docker_image --help
ripe-gigabyte-88964
12/05/2023, 7:35 PMripe-gigabyte-88964
12/05/2023, 7:49 PMcache_from
type: Dict[str, str] | None
default: None
Use an external cache source when building the image.
This option requires BuildKit to be enabled via the Docker subsystem options.
Example:
docker_image(
name="example-local-cache-backend",
cache_to={
"type": "local",
"dest": "/tmp/docker-cache/example"
},
cache_from={
"type": "local",
"src": "/tmp/docker-cache/example"
}
)
Values may use placeholders in curly braces to be interpolated. The placeholders are derived from various sources, such as the Dockerfile instructions and build args.
cache_to
type: Dict[str, str] | None
default: None
Export image build cache to an external cache destination.
This option requires BuildKit to be enabled via the Docker subsystem options.
Example:
docker_image(
name="example-local-cache-backend",
cache_to={
"type": "local",
"dest": "/tmp/docker-cache/example"
},
cache_from={
"type": "local",
"src": "/tmp/docker-cache/example"
}
)
Values may use placeholders in curly braces to be interpolated. The placeholders are derived from various sources, such as the Dockerfile instructions and build args.Is there any way to get the full image tag as a placeholder so I can just set a default for the whole repo?
curved-television-6568
12/05/2023, 7:51 PMcurved-television-6568
12/05/2023, 8:04 PMripe-gigabyte-88964
12/05/2023, 8:04 PMcurved-television-6568
12/05/2023, 8:04 PMripe-gigabyte-88964
12/05/2023, 8:04 PMcurved-television-6568
12/05/2023, 8:05 PM{pants.hash}
that is calculated based in all the inputsā¦ripe-gigabyte-88964
12/06/2023, 4:29 PMdocker-container
as the driver (which is the default from setup-buildx-action) but it's claiming the base image, which it just packaged is not found. So it seems like this fixes the issue of publishing using a driver other than docker
except for images where pants is also building the base image.ripe-gigabyte-88964
12/06/2023, 4:31 PMripe-gigabyte-88964
12/06/2023, 4:33 PMERROR: Cache export feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")
curved-television-6568
12/06/2023, 5:07 PMripe-gigabyte-88964
12/06/2023, 5:08 PM--load
option needs to be added automatically for images with use_buildx
ripe-gigabyte-88964
12/06/2023, 5:09 PMripe-gigabyte-88964
12/06/2023, 5:10 PMhappy-kitchen-89482
12/06/2023, 5:55 PMripe-gigabyte-88964
12/06/2023, 9:54 PMnutritious-hair-72580
12/07/2023, 4:54 AM--load
flag is set (via the equivalent --output=type=docker
) .
I've not tested / investigate support with multiple images - there could be some gaps there. If you could raise an issue with the scenario, happy to take a look.ripe-gigabyte-88964
12/07/2023, 6:38 PMbake
into the buildx functionality and this will handle this issue https://github.com/pantsbuild/pants/issues/20189#issuecomment-1845817114nutritious-hair-72580
12/07/2023, 9:22 PMripe-gigabyte-88964
12/07/2023, 9:23 PMdocker-bake.json
file prior to calling the command.nutritious-hair-72580
12/07/2023, 9:26 PMripe-gigabyte-88964
12/07/2023, 9:28 PMdocker_image
target actually. But you're right that the bigger issue might be getting it so we're doing all of the packaging with a single command instead of packaging each thing independently.curved-television-6568
12/07/2023, 9:30 PMcurved-television-6568
12/07/2023, 9:31 PMdocker_bake
target, that depends on the images to includeā¦ripe-gigabyte-88964
12/07/2023, 9:55 PMcurved-television-6568
12/07/2023, 10:11 PMnutritious-hair-72580
01/05/2024, 6:54 AMcurved-television-6568
01/05/2024, 4:52 PMripe-gigabyte-88964
01/05/2024, 4:54 PMfresh-mechanic-68429
02/09/2024, 9:51 PMthousands-plumber-33255
07/18/2024, 2:35 PMbuildx bake
available with pants? This would be incredibel!ripe-gigabyte-88964
07/25/2024, 4:57 PMcurved-television-6568
07/26/2024, 5:56 AMcurved-television-6568
07/26/2024, 5:56 AMthousands-plumber-33255
07/26/2024, 9:10 AMcurved-television-6568
07/26/2024, 9:20 AM