Skip to content

Commit

Permalink
fix(docker): Use IMAGE_NAME in api image (#3786)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
FabianHertwig committed Jan 3, 2023
1 parent 434beeb commit e53cc2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker/Dockerfile.api
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG base_image_tag
ARG base_image

FROM deepset/haystack:${base_image_tag}
FROM ${base_image}:${base_image_tag}

ENV SERVICE_NAME="gunicorn-service"

Expand Down
2 changes: 2 additions & 0 deletions docker/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ target "cpu" {
dockerfile = "Dockerfile.api"
tags = ["${IMAGE_NAME}:cpu-${IMAGE_TAG_SUFFIX}"]
args = {
base_image = "${IMAGE_NAME}"
base_image_tag = "base-cpu-${BASE_IMAGE_TAG_SUFFIX}"
}
platforms = ["linux/amd64", "linux/arm64"]
Expand All @@ -83,6 +84,7 @@ target "gpu" {
dockerfile = "Dockerfile.api"
tags = ["${IMAGE_NAME}:gpu-${IMAGE_TAG_SUFFIX}"]
args = {
base_image = "${IMAGE_NAME}"
base_image_tag = "base-gpu-${BASE_IMAGE_TAG_SUFFIX}"
}
platforms = ["linux/amd64", "linux/arm64"]
Expand Down

0 comments on commit e53cc2b

Please sign in to comment.