Error while creating docker image from STS 4 - spring-boot

While creating image from STS4 with maven goal spring-boot:build-image -DskipTests ,I am getting error
"Execution default-cli of goal
org.springframework.boot:spring-boot-maven-plugin:2.4.2:build-image
failed: Connection to the Docker daemon at 'localhost' failed with
error "\.\pipe\docker_engine"; ensure the Docker daemon is running
and accessible.." Exception arising : I/O exception
(java.nio.file.NoSuchFileException) caught when processing request to
{}->docker://localhost:2376: \.\pipe\docker_engine Though I am
able to create image from docker quick start terminal CLI but I am
confused why it is facing error while creating from STS. Will you
please help me to solve this 🙂. Note: I am using Environment:
Windows 8.1 , Docker Toolbox(Not Docker Desktop as I don't have
windows 10), STS 4 IDE. Docker Hosts at http://192.168.99.100/

Related

failed to shutdown container in docker:

when im trying to build an image with command docker build im getting this error
im using windows docker desktop
The command '/bin/sh -c yarn install --production' returned a non-zero code: 4294967295: failed to shutdown container: container 1842716825b498d7be9ed514a4839dfc528caafe8f906018c93842517f60635e encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 1842716825b498d7be9ed514a4839dfc528caafe8f906018c93842517f60635e encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)
how this error be resolved
This must be due to windows host failure on docker call when try to shut down the container
Try by restarting docker demon
sudo service docker restart
Check the status of the Docker containers:
docker ps -a
stop and remove it:
docker stop <container-id>
docker rm <container-id>
Then try by building the image again. If the problem still persists, consider upgrading to the latest version of Docker or clear docker cache or
docker system prune

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed:

docker run --gpus all -it -v ~/Desktop:/Desktop --ipc=host sangkny/darknet:yolov4 /bin/bash
When I send this command, I get the following error:
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown. ERRO[0000] error waiting for container: context canceled
here is my setup:
Windows 10 PRO
Ubuntu 18.04LTS subsystem in WSL2 mode
Docker for desktop v20.10.16
I've tried everything I can with googling, but it hasn't been resolved yet.
I'd appreciate it if anyone could give me advice.
Faced the same problem.
After some hours of Googling eventually I've found a solution - Windows overdue update to version 21H2. I came up with that idea after reading Microsoft Docs:
Starting with Windows 10 version 21H2, the Windows Subsystem for Linux has full graphics processing unit (GPU) compute support.
Such a pity I lost so much time on it... Hope it helps.

docker: Error response from daemon: failed to create shim: OCI runtime create failed

I have recently installed Docker on Windows. When I try to start Docker GPU environment, I get the following message:
Status: Downloaded newer image for intrinsick/keras-retinanet-gpu:latest
docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: signal: segmentation fault, stdout: , stderr:: unknown.
Please help me get rid of this error.
Client: Docker version 20.10.13, build a224086.
Desktop:
Docker version 20.10.7, build 20.10.7-0ubuntu5~20.04.2

My docker-compose up is no longer working and cannot start mariadb

I started using a mac and use docker to develop my sites. Until 12 ago my projects were running properly.
The last activity I tried to on the machine was to install brew mysql, which I already removed. After I restarted my machine, I noticed that I can no longer start any docker container and view a project.
I cd into my project folder and run
docker-compose up
The following error shows up:
Sydney-de-Sousas-Mac:scottishleader.co.za sidney$ docker-compose up
Starting scottishleader_mariadb ... error
ERROR: for scottishleader_mariadb Cannot start service mariadb: driver failed programming external connectivity on endpoint scottishleader_mariadb (30a2e258468e8840ca5e67a535835603770afadab58b3e460e624ae3ba587293): Error starting userland proxy: /forwards/expose/port returned unexpected status: 500
ERROR: for mariadb Cannot start service mariadb: driver failed programming external connectivity on endpoint scottishleader_mariadb (30a2e258468e8840ca5e67a535835603770afadab58b3e460e624ae3ba587293): Error starting userland proxy: /forwards/expose/port returned unexpected status: 500
ERROR: Encountered errors while bringing up the project.
Sydney-de-Sousas-Mac:scottishleader.co.za sidney$
I run docker ps and no container is listed
Sydney-de-Sousas-Mac:scottishleader.co.za sidney$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Why can I suddenly not start the container?

Deploying Lagom Microservices on Kubernetes

I'm trying to deploy Lagom microservices on Kubernetes by following-up the Chirper Lagom example. So According to the provided guide link, I configured a kubernetes cluster by installing Minikube and everything is good.
But when I tried to build Chirper Docker images by using fabric8’s docker-maven-plugin, I got this error:
[ERROR] Failed to execute goal
io.fabric8:docker-maven-plugin:0.20.1:build (default-cli) on project
friend-impl: Execution default-cli of goal
io.fabric8:docker-maven-plugin:0.20.1:build failed: No
given, no DOCKER_HOST environment variable, no read/writable
'/var/run/docker.sock' or '//./pipe/docker_engine' and no external
provider like Docker machine configured -> [Help 1]
Is there anyone that can help me to understand that error? Thanks.
[Updating based on discussions in comments]
The issue here is that the Docker CLI is not able to reach the Docker Engine. Since you are using Minikube, you can point docker CLI to Docker engine inside Minikube. That will ensure that images are built inside minikube VM and also ran there subsequently. You can run command:
eval $(minikube docker-env)
This command will set the parameters required by Docker CLI to communicate with Docker engine in Minikube and it should be able to run command which is failing for you!

Resources