include fontconfig in the final image and fix tagging (#3230)

This commit is contained in:
Massimiliano Pippi 2022-09-16 15:33:24 +02:00 committed by GitHub
parent 3134b0d679
commit 859c303c16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -34,5 +34,7 @@ FROM $base_immage AS final
COPY --from=build-image /opt/venv /opt/venv
COPY --from=build-image /opt/pdftotext /usr/local/bin
# pdftotext requires fontconfig runtime
RUN apt-get update && apt-get install -y libfontconfig && rm -rf /var/lib/apt/lists/*
ENV PATH="/opt/venv/bin:$PATH"

View File

@ -23,7 +23,7 @@ variable "HAYSTACK_EXTRAS" {
}
group "base" {
targets = ["base", "base-gpu"]
targets = ["base-cpu", "base-gpu"]
}
group "api" {
@ -40,9 +40,9 @@ group "all" {
target "docker-metadata-action" {}
target "base" {
target "base-cpu" {
dockerfile = "Dockerfile.base"
tags = ["${IMAGE_NAME}:base-${IMAGE_TAG_SUFFIX}"]
tags = ["${IMAGE_NAME}:base-cpu-${IMAGE_TAG_SUFFIX}"]
args = {
build_image = "python:3.10-slim"
base_immage = "python:3.10-slim"
@ -68,7 +68,7 @@ target "cpu" {
dockerfile = "Dockerfile.api"
tags = ["${IMAGE_NAME}:cpu-${IMAGE_TAG_SUFFIX}"]
args = {
base_image_tag = "base-${BASE_IMAGE_TAG_SUFFIX}"
base_image_tag = "base-cpu-${BASE_IMAGE_TAG_SUFFIX}"
}
}