Live data from Hacker News

Docker as an Integrated Development Environment (2019)

medium.com

51–60 of 93 posts

Re: Docker as an Integrated Development Environment (2019)

#51
post #44

Hmm i don’t think you can compare IntelliJ which is a fully featured IDE with refractor functionalities, full text search, debugger and so on to a vim setup with plugins in docker container, just because they both edit text. This what the author did at the end of the write up. It’s like comparing jQuery to NodeJS, yeah they both generally are for JavaScript but serve a different purpose.

The same concept still works; they could have installed IntelliJ and copied over all of the plugins and settings?

Re: Docker as an Integrated Development Environment (2019)

#52
post #44

Hmm i don’t think you can compare IntelliJ which is a fully featured IDE with refractor functionalities, full text search, debugger and so on to a vim setup with plugins in docker container, just because they both edit text. This what the author did at the end of the write up. It’s like comparing jQuery to NodeJS, yeah they both generally are for JavaScript but serve a different purpose.

I agree, the title of the article is a bit misleading. In general, you’d still need an IDE installed on the host machine, which can then connect to a runtime on the container. With VS Code and remote containers, it’s quite easy.

Alternatively, maybe it’d be possible to have the container expose an IDE over http (possibly vscode through the browser?).

Re: Docker as an Integrated Development Environment (2019)

#53

Earlier quoted context omitted.

So you just shifted your dependency from Docker to Nix. It might be more fun and an intetesting learning experience but also it's more complicated (or at least it's not that widely used like Docker is)

> It might be more fun and an intetesting learning experience but also it's more complicated I can't imagine anyone using both and thinking Nix is more complicated that Docker. And it's not close. > at least it's not that widely used like Docker is "Which has more users" would not enter the top ten reasons I'd choose between tools like this.

I'm a major user of both and I can definitely say that Dockers basics are easier to learn and teach than Nixs basics. Maybe it has to do with the simple nature of the Dockerfile with just lines of commands, compared to Nix where you first need to learn the Nix language, then the idioms, then the package manager and now you can understand the OS. There is a couple of layers before things start making sense. While a Dockerfile is almost like a line-by-line shellscript.

At least that's my experience. Although I do prefer Nix over Docker any day, I'd definitely say the learning curve is steeper with Nix, but it's so worth it long-term.

Re: Docker as an Integrated Development Environment (2019)

#54

Go the next step and run a local kubernetes cluster with kind or k3s (it will take you 30 seconds to have a k8s cluster going). IMHO the kubectl CLI is a lot more logical than docker's CLI. You can create all your local storage volumes ahead of time, create a pod that attaches to it, and then just kubectl exec into the pod vs. writing a long fiddly docker command line string (or crafting a docker-compose.yml). It's e…

Won’t setting up a k8s cluster require writing resource definitions? I imagine you’d need to write a statefulset. How’s that better than writing a docker-compose? I’m not sure how vscode does it, but it allows you to publish ports in real time as well.

Re: Docker as an Integrated Development Environment (2019)

#55

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…

Reproducible dev environment. Easier to reproduce some bugs for fixing. More certainty that it doesn't just work on your laptop because you have an undocumented dependency installed. Easier to test the setup process on a clean machine and vary things about the machine setup. To test what happens if you have Python available system-wide vs. if you don't. More precise development history since you have docker-compose.y…

To add maybe one more point to this - it’s so much easier to run parts of the pipeline for devs who aren’t familiar with the environment. It can also serve as a documentation for what’s required to develop.

Re: Docker as an Integrated Development Environment (2019)

#56
post #45

Using schroot for years here. Can do the same but having access to host easier and so to hw devices. Moving it around my config is easy as having dotfiles around

99% of the time a directory with your projects is all that you need.

If you really need a "container", debootstrap + systemd-nspawn does the job and provides much better sandboxing with 10x less complexity.

You don't need Docker or Nix.

Re: Docker as an Integrated Development Environment (2019)

#57

Does anyone use docker for full-fledged development on OSX? I am a Linux user and tried setting up a dev environment for my colleagues on OSX but file system I/O was extremely slow and completely unusable.

Lots of useful information already have been given, I’d also like to add docker-sync [0] for local development environment.

[0] http://docker-sync.io/

Re: Docker as an Integrated Development Environment (2019)

#58
post #32

Personally I'd prefer going with NixOS to achieve the same result. that way you don't even need a docker installation. As a bonus you can actually install the Nix package manager on osx if you're not into Linux (and this way there is no need for virtualization if you're on a Mac) More info: https://nixos.org/

I love the proposition, but frankly it seems to take too much time to learn even the basics. It would be awesome for someone to build a Docker-like experience on top of Nix, though.

Re: Docker as an Integrated Development Environment (2019)

#59
post #48

Earlier quoted context omitted.

It looks impressive but it isn't clear how much you have to pay for services from them. It isn't free and you aren't in control. Your snapshots and abilities to rollback etc are likely to be dependent on their storage servers. They certainly should monetise, but not making it clear is what I object to. I've raised as an issue for clarification in their community wiki. https://github.com/nix-community/wiki/issues/34

Mmmm, no. Nix is not a SaaS that builds your snapshots that you have to pay for (or that "they need to monotize", what's wrong with people?), it's a whole ecosystem ranging from a full OS (NixOS) down to a package manager (Nix Package Manager) and programming language (just "Nix). Not sure what needs clarification here, it's pretty up-front about it's mission and features already. > Your snapshots and abilities to ro…

I'm really impressed with it and am ONLY seeking clarity. I'll be extremely happy if I can use it standalone. Copyright, licensing are all I'm looking at.

e.g. Something like AGPL is considered copyleft and not compatible with 'open source' ethos. Still 'free' but the additional non-compete cloud service clause is both a sensible move, but something I'd just like to understand.

Your statement of 'what's wrong with people' is what is getting me. Borderline defensive. I'm definitely not knocking the product, quite the reverse. Its so good I want to embrace it wholeheartedly.

I have no problem paying for things, contributing voluntarily to a great product.

Its good to see that various organisations are committed to funding the infrastructure costs etc. (which negates my comment about storage servers).

As to monetisation,kind of irrelevant but was referring to paid services at the bottom of https://nixos.wiki/wiki/Nix_Ecosystem

Re: Docker as an Integrated Development Environment (2019)

#60

Earlier quoted context omitted.

So you just shifted your dependency from Docker to Nix. It might be more fun and an intetesting learning experience but also it's more complicated (or at least it's not that widely used like Docker is)

> It might be more fun and an intetesting learning experience but also it's more complicated I can't imagine anyone using both and thinking Nix is more complicated that Docker. And it's not close. > at least it's not that widely used like Docker is "Which has more users" would not enter the top ten reasons I'd choose between tools like this.

>"Which has more users" would not enter the top ten reasons I'd choose between tools like this.

Size of the community, especially if its quality, means you just increased your surface area at getting help for issues you encounter. Which is a very non-trivial concern in a work environment.

Post reply on HN