Docker for Mac with WebStorm Node Remote Interpreter - docker

I'm trying to setup Docker for Mac (beta) to use a full docker environment.
Client:
Version: 1.13.0-rc7
API version: 1.25
Go version: go1.7.3
Git commit: 48a9e53
Built: Fri Jan 13 21:41:57 2017
OS/Arch: darwin/amd64
Server:
Version: 1.13.0-rc7
API version: 1.25 (minimum version 1.12)
Go version: go1.7.3
Git commit: 48a9e53
Built: Fri Jan 13 21:41:57 2017
OS/Arch: linux/amd64
Experimental: true
Here is my issue. When I go to WebStorm this is what I have:
I'm able to run and stop docker run -d -p 80:80 --name webserver nginx just fine.
What are the steps that I need to get to configure Node.js Remote Interpreter correctly?

I found this: https://kawashi.me/docker-integration-in-pycharm-when-using-docker-for-mac.html and it works like a charm. :) I really didn't want to install brew or any extra packages but for this I will make an exception.

Related

Docker cannot access any Internet URL during build

I have the following Dockerfile:
FROM mcr.microsoft.com/windows/servercore:ltsc2019
SHELL ["powershell", "-Command"]
RUN Invoke-WebRequest -UseBasicParsing http://www.google.com
On my Windows 10 machine, I run docker build . and get the following:
Basically, Docker is unable to access any Internet URL I try. I can run the same Dockerfile on my Windows Server 2019 Core machine and everything works fine. I'm running Docker version 18.09.2 and haven't updated it recently. This was working a few days ago, so it's a new issue. I've tried restarting the Docker engine and also rebooting. I've also tried a docker system prune. Any ideas what broke this? I'd rather not reinstall Docker if possible.
Docker Info:
Client: Docker Engine - Community
Version: 18.09.2
API version: 1.39
Go version: go1.10.8
Git commit: 6247962
Built: Sun Feb 10 04:12:31 2019
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.2
API version: 1.39 (minimum version 1.24)
Go version: go1.10.6
Git commit: 6247962
Built: Sun Feb 10 04:28:48 2019
OS/Arch: windows/amd64
Experimental: false
Update: Seems to be DNS related. I can ping things.
This is a known issue with ltsc2019 images (https://github.com/Azure/AKS/issues/1029). Put following at the start of your dockerfile or before entrypoint
Set-DnsClientServerAddress -InterfaceIndex (Get-NetAdapter).IfIndex -ServerAddresses ('8.8.8.8')

Not able to run .sh file inside windows docker container

I have built image on top of microsoft/windowsservercore using dockerfile on Windows 10 machine. Docker image is created successfully. I need to run .sh file after logging into windows container. However i am not able to run any .sh file. If i run .sh file, nothing happens.
c:\WorkSpace\dbscripts>bash init_db.sh
c:\WorkSpace\dbscripts>
bash is present on container as Git is installed.
c:\WorkSpace\dbscripts>where bash
c:\git\bin\bash.exe
Is there any way by which i can run .sh files inside windows container ?
C:\Users\Jayesh>docker version
Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:12:48 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.24)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:21:42 2018
OS/Arch: windows/amd64
Experimental: true

Running windows docker in virtual machine crashing

I am running windows docker on a virtual machine and when i try to run docker run, it crashes the vm as well saying unhandled exception. And get logged out of the vm
The vm is windows server 2016 running on a host that is 2012.
The docker version info
Client:
Version: 17.06.2-ee-6
API version: 1.30
Go version: go1.8.3
Git commit: e75fdb8
Built: Mon Nov 27 22:46:09 2017
OS/Arch: windows/amd64
Server:
Version: 17.06.2-ee-6
API version: 1.30 (minimum version 1.24)
Go version: go1.8.3
Git commit: e75fdb8
Built: Mon Nov 27 22:55:16 2017
OS/Arch: windows/amd64
Experimental: false
The docker logs get corrupted for this specific container I am trying to run each time that I try to run the docker. So i cant diagnose what happened. Please suggest what i can do.
In a windows OS I ended up running docker inside a vagrant debian/centos box.
It's ligthweight and never had a problem.

unable to find the /etc/default/docker with latest docker 17.03.0-ce

I have installed latest docker version 17.03.0-ce in centos 7 and please find the docker version details below,
Client:
Version: 17.03.0-ce
API version: 1.26
Go version: go1.7.5
Git commit: 3a232c8
Built: Tue Feb 28 08:10:07 2017
OS/Arch: linux/amd64
Server:
Version: 17.03.0-ce
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 3a232c8
Built: Tue Feb 28 08:10:07 2017
OS/Arch: linux/amd64
Experimental: false
I need to do an multi-host networking using swarm and i was following this link Lab 06: Docker Networking
They have mentioned to edit /etc/default/docker file to comment out DOCKER_OPTS value. But i couldnt see any file in my host machine. Where could i find this file to change the value of DOCKER_OPTS
The guide is for debian based systems that use /etc/default in Redhat based systems use:
/etc/sysconfig
in your case:
/etc/sysconfig/docker
You can edit the systemd unit file directly for your purpose, but its not recommended.

File not getting updated when using "docker cp"

I am trying to use docker cp to copy .class files from my host into the container. I am using the following command:
docker cp foo.class container:/path/foo.class
I am doing this when the server running inside the container is shutdown.
However, I am seeing that the foo.class isn't getting updated with my latest file and if I try to rm the file I get a
rm: cannot remove foo.class: Stale file handle
Here is my docker version (Docker for Mac):
docker version
Client:
Version: 1.13.0
API version: 1.25
Go version: go1.7.3
Git commit: 49bf474
Built: Wed Jan 18 16:20:26 2017
OS/Arch: darwin/amd64
Server:
Version: 1.13.0
API version: 1.25 (minimum version 1.12)
Go version: go1.7.3
Git commit: 49bf474
Built: Wed Jan 18 16:20:26 2017
OS/Arch: linux/amd64
Experimental: true
Anyone seen this happen?
TIA

Resources