Docker image for aspNet core hangs on windows - linux

I am trying to build a docker image for aspnet core on windows(which eventually I intend to deploy on an ubuntu box).
I am following the sample "as is" given in following link:
deploy aspet core on linux using docker container
Problem appears when I try building docker image using following command given in tutorial:
docker build -t mydemos:aspnetcorehelloworld .
It hangs after completing step 4 called RUN dotnet restore
Docker output screen looks like this:
any help is appreciated...

finally, I could figure that out. I had to do followings:
1.) upgrade the docker command tool(yes, I am working on windows 7) to 1.12.2 (version that's being referred to in tutorial I was following, given in my question) and
2.) also upgraded Oracle Virtual Box to version 5.1.8.
Done that, it worked!!! Thanks anyway!

Related

Why does the docker container exits immediately? on PLC

I am running docker on a WAGO-PFC 8204 device and successfully able to install an image for node-red flow based editor. However, when i am trying to run the image, it creates a container but automatically exits. I am not running this image on a linux machine itself but instead of other device. I ran docker logs [container name] but output was Error: fatal error, line 0. Please see the image attached.
Please help anyone if you can. Thanks
This is because version 3.0.0 of the Node-RED Docker container will not run on old versions of Docker that do not support 64bit time on a 32bit OS.
You can try adding --security-opt=seccomp=unconfined to the docker run command or upgrade docker/libseccom to a supported version of the latest apline base container.
Details of the minimum version are in the release notes on github
https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.13.0#time64_requirements
https://github.com/node-red/node-red-docker/issues/319
Work around:
Use the nodered/node-red:2.2.2 container rather than the new 3.0.0 (latest) tags

How do I set up PhpStorm/WebStorm to work with Node.js in a docker container?

I am trying to use PhpStorm to debug as Node application that is running in a docker container. The image is called parsoid-dev, it only exists locally on my machine. I can run it using docker run parsoid-dev.
In the PhpStorm settings, I created a remote Node.js interpreter configuration for this image using the server type "Docker", image "parsoid-dev", and path "node".
But when I try to run the application, I get this error:
Failed to prepare environment: Cannot find image: parsoid-dev
But the image is clearly there, I can use it from the command line... What am I missing?
EDIT: I'm using PhpStorm 2021.3.3 on Windows 11 and Docker for Windows 4.6.0 (Docker Desktop engine 20.10.13). I'm running Ubuntu 20.04.4 in WSL2.
Please try specifying the image name with a tag, e.g. parsoid-dev:latest - does it help?

There has been a runner system failure, please try again

How to resolve this error specially on macbook. I have installed docker on my machine also but its not working.
You have to start docker deamon on your gitlab runner.
Below is link to docker desktop for mac.
If you start docker desktop gui, docker deamon will start.
https://docs.docker.com/desktop/mac/
This problem is not just for mac computers but also for windows. I experienced this problem and found out that the the PowerShell script part for Infra as Code that I was using was not installing docker.
I therefore made changes to the Infra as Code to ensure that Microsoft-Hyper-V is enabled and that docker is actually installed and docker service started, then the computer HAS to be restarted for the changes to pick up.
I do not know the exact order of when the restart should happen since I am still understanding the flow but I can update my answer when I have more info

Windows docker container vs Linux docker container

I am new to the Docker/Kubernetes world in general.
As i am just starting with the whole architecture i have the following:
Azure Container Service -- up and running using Linux for master and agents
Docker for windows on my machine -- up and running
automated build for a .NetCore application on VSTS using Docker task to build and push the image to the Azure Container registry
Kubectl running as well kubernetes UI from master nodes
when building the .NetCore application from my machine using Docker commands and then publish it to the registry, Kubernetes is able to pull it and run it, but when the image is built and pushed by the VSTS build tasks kubernetes is failing to pull the images. after researching the error a bit, it turned out that the image coming from the VSTS build is made for windows and therefor cannot be pulled.
What is the difference between Docker Container for Windows and Linux, and how can we convert or specify the type while building the image.
What is the difference between Docker Container for Windows and Linux.
In short, Linux docker run on Linux and work with Linux kernel, Windows docker run on windows server 2016 or windows 10, work with windows hyper virtualization, and request windows dll and other packages.
So we can't run windows docker image on Linux docker.
how can we convert or specify the type while building the image.
As far as I know, we can't convert the docker image to another type.
We can use VSTS to build .NET core Linux Docker image, please refer to this blog.
Also, we can use different docker platform use Docker file to build docker image.
More information about how to build windows docker image with docker file, please refer to this blog.
More information about how to build Linux docker image with docker file, please refer to this article.
After docker image created, we can follow this article to push and pull an image from Azure container registry.

How to remove/install a docker image on an unconfigured Docker for centos 7

Using Centos 6.6 and 7 and deciding to move to centos 7 as there are some issues using docker with centos 6.6 (reboot issues for me) and i'm trying to pull the current centos image from docker. (should just be docker pull centos)
However because i already had a docker image of centos installed on the 6.6 virtual machine, i thought it conflicts with the one im trying to pull on the centos 7. It states that the image (f1b something) is already being used on the system and is causing the download to not go through. Simply going over to the centos 6.6 and trying to remove the images (which would be labeled as none by the way, thus you have to do docker images -a),even with force, does nothing. The only solution so far to this is to do a full removal of docker and its dependencies, and reinstall it which should come package free.
Of course this is not the solution i want. One of two things can happen. Either a way to make the two of them to coexist, or a way to remove the current one without removing any other current images. Or if I am not getting this right, take an entirely different approach.
EDIT+1: Ok heres the actual error im receiving when doing the the docker pull...
f1b...: download complete
f1b...:error downloading dependant layers
c85...:Downloading [>
7322...: Error pulling image (latest) from docker.io/centos, endpoint :https://registry-1.docker.io/v1,Dr
7322...:Error pulling image (latest) from docker.io/centos, Driver devicemapper failed to create image rootfs
FATA[0012] Error pulling image (latest) from docker.io/centos, Driver device mapper failed to create image rootfs f1b...:error running DeviceCreate (createSnapDevice) dm_task_run failed
And looking over the problem more im not so sure if its because of the centos 6.6 like i had initially thought despite sharing the same ID's.
EDIT +2: Stranger still is that the fatal error codes keeps changing (im assuming those are FATA[0012]?)
http://docker-sean.readthedocs.org/en/latest/chapter1.html
Theres a config file that needs to be changed for centos 7 docker users which happened to be applying the following change
OPTIONS='-g /docker/data -p /var/run/docker.pid'
in the vim/vi file of /etc/sysconfig/docker.
I swear docker is going to be the death of me...
EDIT +1: Ok lets remap the solution to the following starting from a new centos 7 machine...
yum install docker
service docker start
docker pull centos
ERROR
systemctl enable docker.service
ERROR?
sudo systemctl enable docker.service
systemctl start docker.service
ERROR?
yum remove docker
yum install epel-release.noarch
yum install docker-io
vim /etc/sysconfig/docker
OPTIONS='-g /docker/data -p /var/run/docker.pid'
service docker restart
docker pull centos
and thats how i got docker to work on the new VM if i mapped it correctly.
Also one of the commands i might have used was a thin_check. Somebody used it to verify docker in this link
EDIT +2:
Oh wow, this would explain even better whats happening here. See, the docker server can be installed straight out of the box with centos 7, however the daemon must still be installed from epel. As a reminder, the daemon is the item that actually runs the docker service. The server just allows docker to connect to the internet and view its repositories. Link is right here.

Resources