I was happily following along Docker community for almost 2 years while developing on Docker for OSX and was sold - it’s awesome. At my new gig, sadly, we’re on Windows 10, on a strict IT policy corporate domain and I do not have admin privileges on the local machine. Some things I am required to use force me to connect with Cisco VPN. After a week of pleading my case with the powers that be, I got Docker installed. I was cautiously optimistic.
Now after a week of working with the latest D4W I find Docker latest stable frustrating at best, unusable at worst.
I can mount volumes, sometimes, but other times the files disappear. I believe it has to do with the order of start up programs, or if I’m connected to VPN first before launching Docker, or if Docker launches first, and then my VPN causes a change to the network. I’m really hoping someone can point to a better (more stable/reliable) way to share files between the host and containers. I’m debating using an FTP server on the web server container, but it won’t work for MySQL data, for example.
Does anyone know a solid way to get file sharing working reliably on Windows?
Another example; I don’t really understand what I’m seeing here… I turned off the “launch Docker at boot” option. My docker machine is not running. Yet I can list containers, and some are running. That is,
> docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
> docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
05f845c1f4d4 redis:latest "docker-entrypoint.sh" 3 days ago Up 2 days 0.0.0.0:6379->6379/tcp, 6379/tcp redis
729c9e06cb7b percona:latest "docker-entrypoint.sh" 3 days ago Up 2 days 0.0.0.0:3306->3306/tcp db
How is this possible?
At any rate, I figured out how to map my Mac OS X shortcuts from ~/.bash_profile to %USER_DIR%/WindowsPowerShell/Microsoft.PowerShell_profile.ps1
Here they are if you find them useful.
function dll()
{
docker ps -a
}
function dim()
{
docker images
}
function de($container)
{
docker exec -it $container /bin/bash
}
function drun($app)
{
if (!$app)
{
write-host "You must supply one argument, the name of the app/container to run."
}
else
{
switch ($app)
{
"redis" {docker run -d -e APP=redis --name redis -p 6309:6309 redis:latest}
"db" {docker run -d -e APP=db -e MYSQL_ROOT_PASSWORD=<XX> -e MYSQL_DATABASE=<XX> -e MYSQL_USERNAME=<XX> -e MYSQL_PASSWORD=<XX> --name=db -p 3306:3306 percona:latest}
"web" {docker run -d -e APP=web --link db:db --link redis:redis -v C:/Users/YOURUSER/Documents/YOURAPP:/var/www/html -p 80:80 --name YOURCONTAINER YOURIMAGE}
}
}
}
function dsta ($app)
{
docker start $app
}
function dsto ($app)
{
docker stop $app
}
function drm ($app)
{
docker rm $app
}
function ls ($arg)
{
dir
}