Skip to content

Commit 859c303

Browse files
authored
include fontconfig in the final image and fix tagging (#3230)
1 parent 3134b0d commit 859c303

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

docker/Dockerfile.base

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,7 @@ FROM $base_immage AS final
3434

3535
COPY --from=build-image /opt/venv /opt/venv
3636
COPY --from=build-image /opt/pdftotext /usr/local/bin
37+
# pdftotext requires fontconfig runtime
38+
RUN apt-get update && apt-get install -y libfontconfig && rm -rf /var/lib/apt/lists/*
3739

3840
ENV PATH="/opt/venv/bin:$PATH"

docker/docker-bake.hcl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ variable "HAYSTACK_EXTRAS" {
2323
}
2424

2525
group "base" {
26-
targets = ["base", "base-gpu"]
26+
targets = ["base-cpu", "base-gpu"]
2727
}
2828

2929
group "api" {
@@ -40,9 +40,9 @@ group "all" {
4040

4141
target "docker-metadata-action" {}
4242

43-
target "base" {
43+
target "base-cpu" {
4444
dockerfile = "Dockerfile.base"
45-
tags = ["${IMAGE_NAME}:base-${IMAGE_TAG_SUFFIX}"]
45+
tags = ["${IMAGE_NAME}:base-cpu-${IMAGE_TAG_SUFFIX}"]
4646
args = {
4747
build_image = "python:3.10-slim"
4848
base_immage = "python:3.10-slim"
@@ -68,7 +68,7 @@ target "cpu" {
6868
dockerfile = "Dockerfile.api"
6969
tags = ["${IMAGE_NAME}:cpu-${IMAGE_TAG_SUFFIX}"]
7070
args = {
71-
base_image_tag = "base-${BASE_IMAGE_TAG_SUFFIX}"
71+
base_image_tag = "base-cpu-${BASE_IMAGE_TAG_SUFFIX}"
7272
}
7373
}
7474

0 commit comments

Comments
 (0)