Live data from Hacker News

Docker as an Integrated Development Environment (2019)

medium.com

1–10 of 93 posts

Re: Docker as an Integrated Development Environment (2019)

#2
"Choosing a base image can be quite daunting. I’m always a fan of Alpine Linux for my application containers, so that’s what I chose."

Just be aware that means the musl libc, which is often fine, but not always. Software that expects glibc can crash or have unpredictable behavior. The JVM is a good example, unless you get a JVM that was originally built against musl.

And sometimes also issues with busybox, where it differs from other implementations of the same tools.

Re: Docker as an Integrated Development Environment (2019)

#3
Can you run ansible or terraform inside a docker container?

There are two parts of the dev environment - the programmer preferences and the project libraries and other infrastructure. What I would like is to have a way to compose those two and ideally something that would work the same way inside a docker container as in a full VM.

Re: Docker as an Integrated Development Environment (2019)

#4
Cool stuff. A few months ago I looked into building a CITRIX alternative based on the idea that you would run application frontends in a local secure docker container while running the backend in the cloud. E.g. you could run VSCode locally while actually compiling in a kubernetes cluster. I eventually ruled out the idea for business reasons, but from a technical perspective it's doable and probably useful. At the time I thought the primary advantage would be reduced cloud costs and lower latency.

Re: Docker as an Integrated Development Environment (2019)

#6
post #2

"Choosing a base image can be quite daunting. I’m always a fan of Alpine Linux for my application containers, so that’s what I chose." Just be aware that means the musl libc, which is often fine, but not always. Software that expects glibc can crash or have unpredictable behavior. The JVM is a good example, unless you get a JVM that was originally built against musl. And sometimes also issues with busybox, where it d…

Yeah, this is why I use debian slim as an image for most projects unless I'm prioritizing small size. Its small and popular enough that a lot of other images already use it and chances are that you dont have to redownload it.

Re: Docker as an Integrated Development Environment (2019)

#7
That is a nice write up. We use a very similar set up to containerise our embedded tool chains.

Additionally, we use a wrapper script to symlink the current containerised project to the same location in the host system. This ensures, that outputs in the containerised environment points to valid paths in the host:

E. g.: docker mount: /home/me/dev/proj1234 > /workspace

symlink in host: ln -sfn /home/me/dev/proj1234 /workspace

Re: Docker as an Integrated Development Environment (2019)

#8
post #3

Can you run ansible or terraform inside a docker container? There are two parts of the dev environment - the programmer preferences and the project libraries and other infrastructure. What I would like is to have a way to compose those two and ideally something that would work the same way inside a docker container as in a full VM.

Yes to terraform. We use it at our work to setup some dynamodb tables for testing locally. We mount the .terraform folder.

Re: Docker as an Integrated Development Environment (2019)

#9
I only get a new laptop once every several years. Doesn't really seem worth it to me personally. I also sort of like starting fresh in a way. Granted I have my dot-files on github to make that part easier. But I don't mind running the install command for things as they come up.

I'm curious if there are other benefits to this approach though besides just saving time when setting up a new machine. The article mentioned "you end up with (in my opinion) a much more flexible working environment." Any ideas what they might mean?

Re: Docker as an Integrated Development Environment (2019)

#10
post #3

Can you run ansible or terraform inside a docker container? There are two parts of the dev environment - the programmer preferences and the project libraries and other infrastructure. What I would like is to have a way to compose those two and ideally something that would work the same way inside a docker container as in a full VM.

I have a co-worker who had the idea of stuffing Ansible into a container. This would allow anyone to easily run any Ansible playbooks without having to deal with dependencies and versions. It’s absolutely terrible to use. You end up having wrapper scripts to make it even remotely usable.

Mounting things in the right locations is a nightmare, even minor changes becomes a hassel. For Ansible, just learn to use virtualenvs.

Terraform may be a little better.

Post reply on HN