Skip to content

Commit e53cc2b

Browse files
fix(docker): Use IMAGE_NAME in api image (#3786)
If you set the IMAGE_NAME variable, then the base image will use that name, but the api image would previously use a hardcoded `deepset/haystack` image name.
1 parent 434beeb commit e53cc2b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docker/Dockerfile.api

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ARG base_image_tag
2+
ARG base_image
23

3-
FROM deepset/haystack:${base_image_tag}
4+
FROM ${base_image}:${base_image_tag}
45

56
ENV SERVICE_NAME="gunicorn-service"
67

docker/docker-bake.hcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ target "cpu" {
6868
dockerfile = "Dockerfile.api"
6969
tags = ["${IMAGE_NAME}:cpu-${IMAGE_TAG_SUFFIX}"]
7070
args = {
71+
base_image = "${IMAGE_NAME}"
7172
base_image_tag = "base-cpu-${BASE_IMAGE_TAG_SUFFIX}"
7273
}
7374
platforms = ["linux/amd64", "linux/arm64"]
@@ -83,6 +84,7 @@ target "gpu" {
8384
dockerfile = "Dockerfile.api"
8485
tags = ["${IMAGE_NAME}:gpu-${IMAGE_TAG_SUFFIX}"]
8586
args = {
87+
base_image = "${IMAGE_NAME}"
8688
base_image_tag = "base-gpu-${BASE_IMAGE_TAG_SUFFIX}"
8789
}
8890
platforms = ["linux/amd64", "linux/arm64"]

0 commit comments

Comments
 (0)