Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to build image using minikube image build #17386

Closed
mnsrulz opened this issue Oct 9, 2023 · 7 comments
Closed

unable to build image using minikube image build #17386

mnsrulz opened this issue Oct 9, 2023 · 7 comments
Labels
co/runtime/docker Issues specific to a docker runtime kind/support Categorizes issue or PR as a support question. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@mnsrulz
Copy link

mnsrulz commented Oct 9, 2023

What Happened?

running simple build command minikube --alsologtostderr image build . failing with the following error The legacy builder is deprecated and will be removed in a future release

Attach the log file

I1009 15:57:04.707901   17476 out.go:296] Setting OutFile to fd 84 ...
I1009 15:57:04.709443   17476 out.go:309] Setting ErrFile to fd 88...
I1009 15:57:04.730795   17476 config.go:182] Loaded profile config "minikube": Driver=hyperv, ContainerRuntime=docker, KubernetesVersion=v1.27.4
I1009 15:57:06.282534   17476 config.go:182] Loaded profile config "minikube": Driver=hyperv, ContainerRuntime=docker, KubernetesVersion=v1.27.4
I1009 15:57:06.284535   17476 main.go:141] libmachine: [executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state
I1009 15:57:06.902331   17476 main.go:141] libmachine: [stdout =====>] : Running

I1009 15:57:06.902331   17476 main.go:141] libmachine: [stderr =====>] :
I1009 15:57:06.920611   17476 ssh_runner.go:195] Run: systemctl --version
I1009 15:57:06.921113   17476 main.go:141] libmachine: [executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state
I1009 15:57:07.531545   17476 main.go:141] libmachine: [stdout =====>] : Running

I1009 15:57:07.531545   17476 main.go:141] libmachine: [stderr =====>] :
I1009 15:57:07.531545   17476 main.go:141] libmachine: [executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM minikube ).networkadapters[0]).ipaddresses[0]
I1009 15:57:08.285633   17476 main.go:141] libmachine: [stdout =====>] : 192.168.0.15

I1009 15:57:08.285633   17476 main.go:141] libmachine: [stderr =====>] :
I1009 15:57:08.285633   17476 sshutil.go:53] new ssh client: &{IP:192.168.0.15 Port:22 SSHKeyPath:C:\Users\REDACTED\.minikube\machines\minikube\id_rsa Username:docker}
I1009 15:57:08.368143   17476 ssh_runner.go:235] Completed: systemctl --version: (1.44754s)
I1009 15:57:08.368143   17476 build_images.go:151] Building image from path: C:\Users\REDACTED~1\AppData\Local\Temp\build.2788695874.tar
I1009 15:57:08.384372   17476 ssh_runner.go:195] Run: sudo mkdir -p /var/lib/minikube/build
I1009 15:57:08.408018   17476 ssh_runner.go:195] Run: stat -c "%s %y" /var/lib/minikube/build/build.2788695874.tar
I1009 15:57:08.411789   17476 ssh_runner.go:352] existence check for /var/lib/minikube/build/build.2788695874.tar: stat -c "%s %y" /var/lib/minikube/build/build.2788695874.tar: Process exited with status 1
stdout:

stderr:
stat: cannot statx '/var/lib/minikube/build/build.2788695874.tar': No such file or directory
I1009 15:57:08.412326   17476 ssh_runner.go:362] scp C:\Users\REDACTED~1\AppData\Local\Temp\build.2788695874.tar --> /var/lib/minikube/build/build.2788695874.tar (6023168 bytes)
I1009 15:57:08.478173   17476 ssh_runner.go:195] Run: sudo mkdir -p /var/lib/minikube/build/build.2788695874
I1009 15:57:08.501513   17476 ssh_runner.go:195] Run: sudo tar -C /var/lib/minikube/build/build.2788695874 -xf /var/lib/minikube/build/build.2788695874.tar
I1009 15:57:08.573954   17476 docker.go:339] Building image: /var/lib/minikube/build/build.2788695874
I1009 15:57:08.590788   17476 ssh_runner.go:195] Run: docker build /var/lib/minikube/build/build.2788695874
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/

Operating System

Windows

Driver

Hyper-V

@afbjorklund
Copy link
Collaborator

That is just a warning, the actual error would be below the docker build deprecation notice.

@afbjorklund afbjorklund added kind/support Categorizes issue or PR as a support question. co/runtime/docker Issues specific to a docker runtime labels Oct 10, 2023
@mnsrulz
Copy link
Author

mnsrulz commented Oct 12, 2023

@afbjorklund Yes you are right! It's somehow taking a longer to display further log messages which makes me think that it just hangs. I created a new sample dotnet project and try to build the image and this time it's making some progress but in the end producing some error. See below

I1012 13:28:12.271921   32324 out.go:296] Setting OutFile to fd 92 ...
I1012 13:28:12.274399   32324 out.go:309] Setting ErrFile to fd 96...
I1012 13:28:12.298542   32324 config.go:182] Loaded profile config "minikube": Driver=hyperv, ContainerRuntime=docker, KubernetesVersion=v1.27.4
I1012 13:28:12.330215   32324 config.go:182] Loaded profile config "minikube": Driver=hyperv, ContainerRuntime=docker, KubernetesVersion=v1.27.4
I1012 13:28:12.332443   32324 main.go:141] libmachine: [executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state
I1012 13:28:12.958657   32324 main.go:141] libmachine: [stdout =====>] : Running

I1012 13:28:12.958657   32324 main.go:141] libmachine: [stderr =====>] :
I1012 13:28:12.978087   32324 ssh_runner.go:195] Run: systemctl --version
I1012 13:28:12.978614   32324 main.go:141] libmachine: [executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state
I1012 13:28:13.600869   32324 main.go:141] libmachine: [stdout =====>] : Running

I1012 13:28:13.600869   32324 main.go:141] libmachine: [stderr =====>] :
I1012 13:28:13.600869   32324 main.go:141] libmachine: [executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM minikube ).networkadapters[0]).ipaddresses[0]
I1012 13:28:14.380425   32324 main.go:141] libmachine: [stdout =====>] : 192.168.0.24

I1012 13:28:14.380425   32324 main.go:141] libmachine: [stderr =====>] :
I1012 13:28:14.380425   32324 sshutil.go:53] new ssh client: &{IP:192.168.0.24 Port:22 SSHKeyPath:C:\Users\REDACTED\.minikube\machines\minikube\id_rsa Username:docker}
I1012 13:28:14.461278   32324 ssh_runner.go:235] Completed: systemctl --version: (1.482675s)
I1012 13:28:14.461278   32324 build_images.go:151] Building image from path: C:\Users\REDACTED~1\AppData\Local\Temp\build.2689208248.tar
I1012 13:28:14.480065   32324 ssh_runner.go:195] Run: sudo mkdir -p /var/lib/minikube/build
I1012 13:28:14.502934   32324 ssh_runner.go:195] Run: stat -c "%s %y" /var/lib/minikube/build/build.2689208248.tar
I1012 13:28:14.506008   32324 ssh_runner.go:352] existence check for /var/lib/minikube/build/build.2689208248.tar: stat -c "%s %y" /var/lib/minikube/build/build.2689208248.tar: Process exited with status 1
stdout:

stderr:
stat: cannot statx '/var/lib/minikube/build/build.2689208248.tar': No such file or directory
I1012 13:28:14.506527   32324 ssh_runner.go:362] scp C:\Users\REDACTED~1\AppData\Local\Temp\build.2689208248.tar --> /var/lib/minikube/build/build.2689208248.tar (467968 bytes)
I1012 13:28:14.536640   32324 ssh_runner.go:195] Run: sudo mkdir -p /var/lib/minikube/build/build.2689208248
I1012 13:28:14.559471   32324 ssh_runner.go:195] Run: sudo tar -C /var/lib/minikube/build/build.2689208248 -xf /var/lib/minikube/build/build.2689208248.tar
I1012 13:28:14.566102   32324 docker.go:339] Building image: /var/lib/minikube/build/build.2689208248
I1012 13:28:14.582886   32324 ssh_runner.go:195] Run: docker build /var/lib/minikube/build/build.2689208248
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    468kB
Step 1/9 : FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
7.0: Pulling from dotnet/sdk
e67fdae35593: Already exists
0ab66724116f: Already exists
14ccddebb1bc: Pulling fs layer
5e265b51b431: Pulling fs layer
3bda6efdfc5b: Pulling fs layer
9a6d473c86f6: Pulling fs layer
5464f27bea88: Pulling fs layer
3cc0e9253374: Pulling fs layer
5464f27bea88: Waiting
3cc0e9253374: Waiting
9a6d473c86f6: Waiting
5e265b51b431: Verifying Checksum
5e265b51b431: Download complete
3bda6efdfc5b: Verifying Checksum
3bda6efdfc5b: Download complete
9a6d473c86f6: Verifying Checksum
9a6d473c86f6: Download complete
14ccddebb1bc: Verifying Checksum
14ccddebb1bc: Download complete
3cc0e9253374: Verifying Checksum
3cc0e9253374: Download complete
14ccddebb1bc: Pull complete
5e265b51b431: Pull complete
3bda6efdfc5b: Pull complete
5464f27bea88: Verifying Checksum
5464f27bea88: Download complete
9a6d473c86f6: Pull complete
5464f27bea88: Pull complete
3cc0e9253374: Pull complete
Digest: sha256:d0755fbf1ed34aecd79c127fd1dd01b80587acdb8ff50e5a68d1adf8b076922b
Status: Downloaded newer image for mcr.microsoft.com/dotnet/sdk:7.0
 ---> bd36eac352db
Step 2/9 : WORKDIR /App
 ---> Running in 97c79bb47ff7
Removing intermediate container 97c79bb47ff7
 ---> 4d96dec9ac49
Step 3/9 : COPY . ./
 ---> 14a080f5c84a
Step 4/9 : RUN dotnet restore
 ---> Running in 5c9c53007c7a
  Determining projects to restore...
  Restored /App/dotnetsample.csproj (in 72 ms).
Removing intermediate container 5c9c53007c7a
 ---> 77023d6336ad
Step 5/9 : RUN dotnet publish -c Release -o out
 ---> Running in 99ad48c6a6c9
MSBuild version 17.7.3+8ec440e68 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
/usr/share/dotnet/sdk/7.0.402/Current/SolutionFile/ImportAfter/Microsoft.NET.Sdk.Solution.targets(36,5): warning NETSDK1194: The "--output" option isn't supported when building a solution. Specifying a solution-level output path results in all projects copying outputs to the same directory, which can lead to inconsistent builds. [/App/dotnetsample.sln]
  dotnetsample -> /App/bin/Release/net7.0/dotnetsample.dll
  dotnetsample -> /App/out/
Removing intermediate container 99ad48c6a6c9
 ---> 6c02be9cc7ee
Step 6/9 : FROM mcr.microsoft.com/dotnet/aspnet:7.0
7.0: Pulling from dotnet/aspnet
e67fdae35593: Already exists
0ab66724116f: Already exists
14ccddebb1bc: Already exists
5e265b51b431: Already exists
3bda6efdfc5b: Already exists
Digest: sha256:77ea66eb200fa06d2929cc937b75724bb2f5cdf2bcf6dc6aaf0851bb75bb631f
Status: Downloaded newer image for mcr.microsoft.com/dotnet/aspnet:7.0
 ---> b06452c8ee91
Step 7/9 : WORKDIR /App
 ---> Running in 8a957a300f84
Removing intermediate container 8a957a300f84
 ---> 106e6327d3c7
Step 8/9 : COPY --from=build-env /App/out .
 ---> 760b5ad5a43f
Step 9/9 : ENTRYPOINT ["dotnet", "DotNet.Docker.dll"]
 ---> Running in 1e3756a15e21
Removing intermediate container 1e3756a15e21
 ---> aefcbf64ff1f
Successfully built aefcbf64ff1f
I1012 13:28:46.267467   32324 ssh_runner.go:235] Completed: docker build /var/lib/minikube/build/build.2689208248: (31.6848063s)
I1012 13:28:46.284257   32324 ssh_runner.go:195] Run: sudo rm -rf /var/lib/minikube/build/build.2689208248
I1012 13:28:46.311814   32324 ssh_runner.go:195] Run: sudo rm -f /var/lib/minikube/build/build.2689208248.tar
I1012 13:28:46.316807   32324 build_images.go:207] Built  from C:\Users\REDACTED~1\AppData\Local\Temp\build.2689208248.tar
I1012 13:28:46.317920   32324 build_images.go:123] succeeded building to: minikube
I1012 13:28:46.317920   32324 build_images.go:124] failed building to:

@afbjorklund
Copy link
Collaborator

afbjorklund commented Oct 12, 2023

Successfully built aefcbf64ff1f

succeeded building to: minikube
failed building to:

This is not an error, it is 1 success and 0 fail

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 30, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 29, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2024
@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/runtime/docker Issues specific to a docker runtime kind/support Categorizes issue or PR as a support question. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants