I have installed Docker Edge 18.06.01-ce on Microsoft Windows 10 with Fall Creators Update.
I want to find a way to configure Docker silently - from for example command console. Unfortunately, I can't use Docker features without Docker daemon running in the background.
Normally I would open Docker for Windows.exe- it does manage Hyper-V machine MobyLinuxVM, creates network switches etc. The problem is that this application is running in tray and has GUI.
Is there any way to start this application from command console and wait until it will configure everyting (until Docker will work correctly)? I have already tried creating manually new machine and starting Docker service, but it does not work - I suspect that I need to map new machine somehow to new console windows (docker-machine env?).
Related
I have recently heard about Actinia and I would like to try it out (I am remote sensing anaylst, I am not used to use command line )
I use Windows 10 . I have cloned Actinia on github and trying to use it on my docker container. I changed my windows containers to linux containers. Once I type in on my GitBash
docker-compose build --pull
It stops at step 16/49, while trying to connect to GRASS GIS. It iterates on the same problem,
GRASS GIS libgis version and date number not available
ERROR: Cannot open URL:
and the url he is trying to connect to.
Thus, I wonder if there is a configuration I am missing.
Source: https://github.com/mundialis/actinia_core/tree/master/docker
If I am creating a docker image for one of my applications and publishing it in docker hub.
This image was downloaded by many users and ran that application in their containers and that generated application logs in a folder.
Now as a developer how can I see those application logs from my machine when that container is in remote computer for which I dont have access?
If it is a virtual machine, I can do ssh to that same machine and go to that folder anse see the logs for that particular application, so how it is possible with docker?
I am not talking about docker event logs, the logs generated by my python application with the logging module. Could you please help me on how to handle this case in dockers.
I don't have any experience with working on dockers.
docker exec can be used to run bash commands in a docker container. But in your case the containers are running in a remote machine and not in your local machine. So, in that case, you have 2 options.
1. ssh into the remote machine and then use docker exec command to check the logs.
2. Directly ssh to the docker container.
But, in both scenarios, you will need SSH access to the remote machines from the end users.
I hope this helps.
If your application writes log files to the container filesystem, this is one of a couple of good uses for Docker bind mounts. If the operator (the person running the container; not you, the original software author) starts the container with
docker run -v $PWD/logs:/app/logs ... you/yourimage
then they will be able to read the log files directly on their host system.
As the original application developer, you have no access to these logs. This is the same as every other (non-SaaS) application: the end user installs software on their system and runs it, but it's on a system you can't log into, so you can't directly see things like log files. The techniques for dealing with this are the same as anything else: when a user files a bug report make sure they provide a sufficient reproduction, log files, and relevant configuration, and reproduce the issue yourself locally.
I have a number of Docker containers (10) each running a Java service that makes up my system. To create these containers I use a couple of docker-compose files. Using the Docker Integration plugin for IntelliJ, I can now spool up these services to my remote server using the Docker-compose option (the images used are built outside of IntelliJ, using Gradle). Here are the steps I have done to achieve this:
I have added a Docker server using the Docker Machine option to connect to the remote Docker daemon (message says Connection Successful).
I have added a new Docker Compose configuration, using the server, specifying my compose files, and the services I want to start.
Now that I have the system controlled through IntelliJ, I have been trying to figure out how to attach the remote debugger to each of these services so that IntelliJ will hit my breakpoints.
Will I need to add the JVM args (-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005) to each service (container) and add the usual remote debug configuration for each service? Do I need to use a different address for each service? If so, how do I add these args? Surely with the Docker Integration plugin, there is an easier way to do this.
IntelliJ Idea v2018.1.5 (Community Edition)
Docker Integration v181.5087.20
Running on a Win7(host) and Virtual Box with Windows Server 2016 TP5(guest vm). On WS2016 i run docker, using the windowsservercore base image for the containers.
I'm trying out kind of a fleet management system where I try to fire up multiple simulated vehicles inside separate docker images.
These vehicle simulators uses a simulated gps which send data to a virtual com port, from which the simulated vehicles read.
In windows XP/7/Server 2016 I have successfully made use of com0com(2.2.2.0 signed) for creating the virtual com ports.
My problem is getting the virtual com ports installed inside a docker container, alternatively accessing them as devices on the host
My first attempt has been running com0com inside docker, installation of the drivers work fine using silent mode, but when creating virtual com port pairs using the installed application I run into problems. The command stalls and if I view the Application eventlog I can see a few rows of this kind for each time I try to run the command.
<date> <time> Information Windows Error Rep. .. 1001 Fault bucket , type 0
When instead trying to create the devices in the host and instead passing the devices I seem to fail to access them
Using com0com --list within the container I can see the devices but not with the same name as I in the host
In the associated Dockerfile I rename them using the com0com setupc.exe to the same name as identified on the host
The mode command issued on the host lists the ports properly, using the mode command from insde the container does on the other hand fail to list them, only showing one item: CON
I then tried passing them using the --device=//./COM128://./COM128 argument to docker run
NOTE!: Is this the correct "path" to the devices?
The noticable result of this is zero, the com0com setupc command gives the same result, same with mode
The strange thing is that when I run powershell and list the serialports i get the expected comports as available on the host, with the correct names, but trying to open one of them gives an exception
PS C:\sims\com0com> [System.IO.Ports.SerialPort]::getportnames()
COM128
COM129
PS C:\sims\com0com> $comports=[System.IO.Ports.SerialPort]::getportnames()
PS C:\sims\com0com> $port= new-Object System.IO.Ports.SerialPort $comports[0],9600,None,8,one
PS C:\sims\com0com> $port.open()
Exception calling "Open" with "0" argument(s): "The port 'COM128' does not exist."
Finally tried just about the same as above but with another virtual com port software(eltima), setting them up in the host, the final result when trying to open the port using ps in the container is the same as for the com0com configured ports
Update:
Tried a new approach, running the container in hyper-v instead, using the -isolation flag to docker run, given the thesis that you would be able to install the com0com drivers in a hyper-v container, not having to try to share them from the host.
Running in hyper-v forced us to change to running the nanoserver base image instead of the windowsservercore base image.
Currently stuck on not being able to run the com0com install tool in nanoserver since the installer(NSIS-based) is a 32bit application, nanoserver only able to run 64bit applications.
Quick glance indicates that a new version(3.0) of NSIS could be used along with the NSIS scripts included in the com0com repo.
All ideas on how to move forward are welcome!
P.S: Same question posted on msdn containers forum
Changed to using named pipes to get it to work since no one else seems to be using docker for windows with serial ports.
I was able to setup the minimesos cluster on my laptop and also could deploy a small command-line utility. Now the questions;
What is the image "containersol/minimesos" used for? It is pulled but I don't see it running, when I do "docker ps". "docker images" lists it.
How come when I run "top" inside the mesos-agent container, I see all the processes running in my host (laptop)? This is a bit strange.
I was trying to figure out what's inside minimesos script. I see that there's just one "docker run ... " command. Would really appreciate if I could get to know what the aforementioned command does that results into 4 containers (1 master, 1 slave, 1 zk, 1 marathon) running on my laptop.
containersol/minimesos runs the Java code that is the core of minimesos. It only runs until it executes the command from the CLI. When you do minimesos up the command name and the minimesosFile will be passed to this container. The container in turn will execute the Java code that will create the other containers that form the Mesos cluster specified in the minimesosFile. That should answer #3 also. Take a look at MesosCluster class thats the root of where the magic happens.
I don't know the answer to #2 will get back to you when I find out.
Every minimesos command runs as a short lived container, whose image is containersol/minimesos.
When you run 'minimesos up' it launches containersol/minimesos with 'up' as the argument. It then launches a cluster by starting other containers like containersol/mesos-agent and containersol/mesos-master. After the cluster is up the containersol/minimesos container exists and is removed.
We have separated cli and minimesos core as a refactoring to prepare for the upcoming API module. We are creating an API to support clients for different programming language. The first client will be a Golang client.
In this new setup minimesos will run launch a long running API server and any minimesos cli commands call the API. The clients will also launch the API server and call the API.