Open
Description
Description
Presently, attempting to run make docker-build
in the workspaces/backend
component results in the following:
$ gmake docker-build
docker build -t nbv2-backend:latest .
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/
Sending build context to Docker daemon 262.7kB
[1/2] STEP 1/12: FROM golang:1.22 AS builder
[1/2] STEP 2/12: ARG TARGETOS
--> Using cache 07e5d0adf0bc19d071694e9fa1f7104f2f635be94c70dfad1f4c456807986d8e
--> 07e5d0adf0bc
[1/2] STEP 3/12: ARG TARGETARCH
--> Using cache 8a19f25cfe94e0ee6691c78fb9a9b97975260c8d7d7af58f6437164b582abadd
--> 8a19f25cfe94
[1/2] STEP 4/12: WORKDIR /workspace
--> Using cache cf6fa1ec0ee33598cd258803a96d9c2a1dce1006e8a21150495838e8cc9bf46f
--> cf6fa1ec0ee3
[1/2] STEP 5/12: COPY go.mod go.sum ./
--> Using cache 58e7f699896bb9c388ece82b31b36c999d685e63df3049242736d5c3d47aec81
--> 58e7f699896b
[1/2] STEP 6/12: RUN go mod download
go: github.com/kubeflow/notebooks/workspaces/[email protected] (replaced by ../controller): reading /controller/go.mod: open /controller/go.mod: no such file or directory
building at STEP "RUN go mod download": while running runtime: exit status 1
gmake: *** [Makefile:94: docker-build] Error 1
As the error indicates - this stems from the replace
directive defined in go.mod
You can see the directive states:
replace github.com/kubeflow/notebooks/workspaces/controller => ../controller
HOWEVER - in the docker-build
Makefile target - we are only passing the current directory as build context
- Please note a similar issue also exists in the
docker-buildx
Makefile target
As ../controller
then isn't part of the build context - there is no way this will currently ever succeed.
Acceptance Criteria
docker-build
can produce a container image of thebackend
componentdocker-buildx
can produce a container image of thebackend
component- The resulting container image can be
run
with a container engine (podman
/docker
) and be at parity with functionality available when running locally
Metadata
Metadata
Assignees
Type
Projects
Status
Needs Triage