#docker (2020-05)
All things docker
Archive: https://archive.sweetops.com/docker/
2020-05-04
While I’m flying past here may as well drop this in case anyone else ever struggled with docker, docker in docker and host VPNs… https://gist.github.com/frimik/d54df89ed3fc9d5c75e5ad93d6353f37 To be continued…
2020-05-13
Yes or no…. AWS workspaces for full development machines for devs with no docker support, instead having them leverage ECS. Gut reaction is don’t make devs use workspaces if they want docker support. Wrong tool for devs. Maybe can do workarounds but better to just docker locally for tests than complicate with remote ECS +cost. Im guessing though and want something to save myself and my friend some massive headaches if I’m right.
If devs have no docker support on their development machines something is wrong. To me the idea of creating a workaround for running docker locally would defeat the purpose of docker itself. Why can’t they not have docker ?
That’s what im saying. I need to know if AWS workspaces + ECS has been done easily before or if this sounds like an anti-pattern . Seems like you and I are asking the same question
Sounds like an anti-pattern.
Agreed
2020-05-14
2020-05-22
Apparently AWS workspaces don’t even support Docker. https://docs.aws.amazon.com/workspaces/latest/adminguide/amazon-workspaces-troubleshooting.html#docker_support
Troubleshooting Amazon WorkSpaces administration issues.
Not sure I follow? I’m using an AWS workspace as my primary IDE and have docker working on it.
Troubleshooting Amazon WorkSpaces administration issues.
From the linked article, states “I’m having trouble using Docker with Amazon WorkSpaces Nested virtualization (including the use of Docker) is not supported on Amazon WorkSpaces for Windows or Linux.” Not sure how true about Linux, but my customer confirmed they are not able to support running Docker on Windows (with Hyper-V – might change with WSL2 rollout)
I assume you’re saying you’re using docker successfully with AWS Workspaces for Linux
Yep - with Linux
Yes, I suppose it wouldn’t work on the Windows workspaces for the stated reason.
Thanks Eric - one more thing - have you ever tried it with a GUI Linux (not that it should matter, but wanted to check)
@Erik Osterman (Cloud Posse) just curious - why did you decide to use AWS Workspaces instead of using the Mac directly?
I was wondering if it’s because of bad Docker Desktop performance. I was thinking of going back to Windows due to the latest changes with Docker and WSL2, however the new Mutagen file sharing seems to have helped somewhat.
Originally, it was that I had one workstation at the office and another one at home. I don’t like to take my laptop with me when it’s everyday packing it up and transporting it. The workspace allowed me to have the same dev experience at home and at work.
But then the fact we deal with a lot of customer information, having that data never leave AWS provides peace of mind. If my laptop is stolen, there’s nothing of value on there.
Ah good point. Thanks for the info.
Has anyone come across a terraform plug-in to translate dockerfiles/docker compose in to ecs container definitions?
That’s an awfully specific need
Just found the aws ecs CLi has the option of creating it. Maybe I’ll just make a null plugin to just call the and create a task definition from it.
When you find the light at the end of the tunnel and make it over to Kubernetes we have https://kompose.io/
kompose is a tool to help users familiar with docker-compose move to Kubernetes. It takes a Docker Compose file and translates it into Kubernetes resources.
LoL one day I’ll get there.
Manage Amazon ECS tasks with docker-compose -style commands on an ECS cluster. For more information on how Docker Compose file syntax works with the Amazon ECS CLI, see .
Use that in Terraform? Sounds kinda sketchy. Anything you want to do in ECS can be done using native resources in Terraform using the AWS provider. That way it will manage state properly
Essentially I find generating the container definitions by hand a bit cumbersome. Especially typing out name= value= for the 50 variables in my application. I already have a docker compose that references an env file and most of the other pieces of info that I need for the said task definition. https://registry.terraform.io/modules/cloudposse/ecs-container-definition/aws/0.21.0?tab=inputs
Or maybe I’ll just write a module that allows me to pass key value and I can generate that env map that way.
Terraform does not have a native container definition. It’s json
Does anyone have experience with running consul-template from a docker container? I’m having some trouble getting the generated template back out of the container
What’s the result you are getting? Haven’t used that particular app but have done similar things
Just some permissions error. I does point out in the readme that it’s likely people will run into that. I’ve move on since, getting things from stdout now.
sounds like maybe the container is running as an unprivileged user so that when bind-mounting ${PWD}/in.tpl
it cannot write to it. chmod 666 ${PWD}/in.tpl
might do the trick.
I’ve move on since, getting things from stdout now.
I think using stdout
is better anyways
docker run -e CONSUL_HTTP_ADDR=$CONSUL_HTTP_ADDR -e VAULT_ADDR=$VAULT_ADDR -e VAULT_TOKEN=$VAULT_TOKEN -e CONSUL_HTTP_TOKEN=$CONSUL_HTTP_TOKEN -v "${PWD}/in.tpl:/in.tpl" -v "${PWD}.env:/consul-template/data/.env" hashicorp/consul-template:alpine -template "in.tpl:.env" -once -log-level=info
2020-05-24
A 1-day digital event on May 28th featuring sessions from Docker experts and the broader container community, a live hallway Q&A track with the Docker Captains, and exclusive interviews with theCUBE.
2020-05-26
2020-05-27
2020-05-29
Does anyone have experience with solving the below issue
[admindbr@localhost ~]$ docker start dbr-inzage-service
Error response from daemon: driver failed programming external connectivity on endpoint dbr-inzage-service (b2dc5391e242e56e993a0bb6ad0e92389826b39f0f02cdafb68f8885aacd909a): exec: "docker-proxy": executable file not found in $PATH
Error: failed to start containers: dbr-inzage-service
It appears the image is trying to run docker-proxy
but it’s not in the path. I assume you’ve checked the Dockerfile / image to verify that docker-proxy
exe is in the $PATH?
Yes, checked that and it is in the path
We’ve moved to flat car linux
Sorry for the late response.. Without seeing the dockerfile I can’t offer much help. What I do when I have an issue like this with an entrypoint/cmd is to change the dockerfile to just drop me at a shell where I can run the commands manually and debug that way.
No problem! Thanks for you response
I had the problem with docker on Fedora CoreOS. Now we solved the problem by using flat car linux
We had to, because of the end of life of Coreos
Ahh, gotcha. Haven’t used flat car, I’ll have to check it out.
It’s pretty good. Matter of minutes to migrate from Coreos to flat car
Add the folder /etc/libeexec/docker to $PATH won’t help