How do you sign to Docker for Windows so you can build images external images? - docker-for-windows

I am having great trouble attempting to build a docker image based on the mhart/alpine-node:6.10.3 image. It requires that I go out to docker hub to get it, which requires that I login in. But I cannot. I have a docker ID. I can login to the hub.docker.com and cloud.docker.com via a browser. However I cannot login either via the docker cli or via the systray for Docker for Windows. What is the trick here? cli says sonnection refused and Docker for Windows login dialog just does nothing and both the boxes are outlined in red.
I've spent hours on this....grrrr...
Thanks!

Related

see firefox when executing robot test in docker

I'm using robotframework with selenium and firefox.
I'm running test in a docker.
But for debugging purpose I want to see sometimes what's happen on the UI.
So is there a way to get the UI of firefox launch when test are running in docker.
thanks
You can use VNC to see what is actually happening over docker. It's like remote access where you can see everything on docker image
Download VNC viewer :
https://www.realvnc.com/en/connect/download/viewer/
Some tutorial :
Click Here
Article
https://medium.com/#shivam.somani09/running-automated-test-cases-on-vnc-viewer-using-docker-16656c3d1d87
OR if you don't want VNC
You can take screenshot if you just want an image on a particular place.
You can also use driver.getPageSource(); to get the HTML code

Reconnect to Google Cloud Platform Terminal

I am running a python machine learning script on google cloud platform. I have connected through SSH in browser. When I run the code it works, but when I close the browser it seems to stop running.
I believe I can make it run in the background with nohup, but I want to be able to check back in on it as it prints outputs on its progress.
Basically I want to be able to start the script, close the terminal and then reconnect from any machine to check on its progress. Any help would be really appreciated.
I am new to google cloud platform if any of this was unclear please as an ill try providing more detail.
You may use an app called as screen. Just install it using `sudo apt-get install screen`` (if debian, ubuntu).
In some cases it might be already installed in your instance, you may check it.
Once installed enter the following command into the terminal:
screen
and press enter. Now, You may start with your job in terminal.
The moment you need to disconnect you may press Ctrl+A and then d.
The session would be disconnected. You may note the session id that would be displayed (eg. detached from 1498.pts-1.server)
You may now close the terminal.
When you come back, use the following command to get back into the older session.
screen -r *screen_id* (eg. screen -r **1498.pts-1.server**)
This process is checked for google cloud, ssh through browser, it really works.
Check this site for mode details.
It sounds like you're referring to the Google Cloud Shell feature. If so then what you desire is not possible, the cloud shell is not intended for non-interactive operation. From Usage limits:
Cloud Shell is intended for interactive use only. Non-interactive
sessions will be ended automatically after a warning.
The cloud shell operates on a temporary Compute Engine virtual machine, which is running only while the cloud shell session is active in the browser.
Apart from the obvious approach of keeping the browser session active while your application is running, you could also provision yourself a non-temporary Compute Engine instance (a free one is available), to which you can connect and on which you can run non-interactive applications as you desire.

Web app not responding on localhost:5000 when run standalone

I have simple DotNet Core app that runs fine with dotnet run but when I do dotnet publish and then dotnet HelloWorld.dll (in the bin/Debug/netcoreapp1.1 directory; same with bin/Rebug/netcoreapp1.1), on my local machine, the command prompt says "Now listening on: http://localhost:5000" but the service is not responding when I navigate to that address with my browser. Are there any kind of logs to review?
I reproduce the same in Windows 10 and OSX 10.11, both with clean dotnet new -t web projects, without any modifications.
In Windows I ran netstat -noa | find "LISTENING" and can see port 5000 at the bottom of the list. But still no connection when I try.
Ideas?
The browser output is:
The localhost page isn’t working
localhost is currently unable to handle this request.
HTTP ERROR 500"
I run .Net Core 1.1.0 - SDK 1.0.0 Preview 2.1-003177 on both the Windows and Mac machine.
Click on the ^ icon of your toolbar to see hidden icons. If IIS is running, you will be able to see each instance and the port that the instance is listening on
I got the same error. To diagnose the error, I started up the app not in IIS Express but in what I think is a self-hosted option that opens in a console window.
If you look through the log in the console window, you might see an error in that log.
Also, I've noticed that sometimes the browser window pops up and navigates to the URL before the host environment is ready to handle the request. All you have to do when you get this error is wait a second and refresh the page, and the host environment will be ready and the page will load.

Is it possible to forward X11 windows in a Capistrano 3?

I'm trying to forward an X11 window from a remote server. Usually I can do something like
ssh -X some#address
and then for example run
feh image.jpg
to see the image.jpg picture on my local machine. Is it possible to get that behaviour in Capistrano 3? I'm installing a software and it requires me to do the usual "nextnextnextfinish". I want to do something similar to (inside the config/deploy.rb)
set ssh_option, {:forward_x11 => true} #doesn't work
but it seems that sshkit doesn't have that option. Is there a list of the ssh_option for sshkit somewhere or is there another solution to this?
Capistrano is to automate deployment using some sort of *sh script on the remote computer. Forwarding X11 Windows would make the user having to interact with the window. Therefore I ended up using a Bash script, Sikuli and Xvfb to automate the solution.

How to browse source code in developer console on Google Compute Engine

I have used Click to deploy MEAN Stack on Google Compute Engine. Everything is fine, runs in the Cloud and on my local machine.
When I try to browse source code in the developer console, I get the Getting startet screen for cloud source tools.
Should it not be set up automatically when I created the instance?
When I SSH into the instance I can see the content of opt/myApp.
This I would like to see in browse source code also.
If I try to git clone the Cloud Repository it is empty.
I'm currently using the trial version. Maybe this is the reason I can not browse or clone the Cloud Repository?
This is a really good suggestion. It would be very interesting to integrate click to deploy in more Google Cloud Platform services. The MEAN click to deploy doesn't have much of a sample application installed, which is why it doesn't make sense to put it in a code repository. The application stack itself (mongo, express, angular, node) you wouldn't put in a repository, which is really the only thing installed on the MEAN Click to Deploy server.