Hacker News new | past | comments | ask | show | jobs | submit login
Dockercraft: Manage Docker containers from Minecraft (github.com/docker)
462 points by shykes on Nov 18, 2015 | hide | past | favorite | 109 comments



Do you realize what you've actually built? A way for people to "hack" by flying through 3d space into computer bricks representing server apps.

90s Hollywood thanks you.



"Certain processes are vital to the computer's operation and should not be killed. For example, after I took the screenshot of myself being attacked by csh, csh was shot by friendly fire from behind, possibly by tcsh or xv, and my session was abruptly terminated." Fantastic!


I immediately thought of this. Dockercraft is the perfect modern recreation of this.


"Cyberspace. A consensual hallucination experienced daily by billions of legitimate operators, in every nation, by children being taught mathematical concepts... A graphic representation of data abstracted from banks of every computer in the human system. Unthinkable complexity. Lines of light ranged in the nonspace of the mind, clusters and constellations of data. Like city lights, receding..."

― William Gibson, Neuromancer (1984)




Which actually existed: https://en.wikipedia.org/wiki/Fsn



I was going to slam this "reddit style comment thread" but this is actually a great example of the Dockercraft in fiction!



This is quite Snow Crash as well.


I've always fantasized about making a 3D world with a built-in scripting language so I could make The Black Sun


This is actually really cool. The concept of Memory Palaces is borne out of the fact that our brains are way better at remembering geographical information than arbitrary information. If you are managing a lot of servers or whatever you'd actually have a much easier time using something like this.

When someone forgets which box you are talking about: "You know, that server out by the river."

Or imagine flyig above all of your servers and seeing how they are all interlinked and how the scale of your operation has grown over time.

This is way ahead of its time but there's definitely something here.


it might be cool to represent the physical datacenter in something like this.


Maybe attach some audio cues to various parameters, and put on some headphones?


This is probably offtopic, but the state of Minecraft modding is really bad

* One dude is maintaining Forge/MinecraftCodersPack/Fernflower, which powers pretty much every mod

* Ad-infested forums and adfly links are the preferred way of distributing mods

* The last moddable client version is 1.8.0, 1.9 is out.

* Getting a mod started is really difficult, and it's not clear what should/shouldn't be in source control.

Props to the author for finding a way around all of this.


I think we can forgive an off topic comment in a thread about administering infrastructure from within a video game. HN isn't that pedantic yet.


I'm hoping someone can chime in with more information. I don't think LexManos (Forge et al) reads HN.


This is true. MeddleAPI[1] is the new hotness as it allows mods to be version-agnostic, however it's still early and there's little documentation. Mojang has been talking about potentially releasing some kit for modding for years, but with the C++ based "Minecraft Windows 10 Edition" out, I see little chance of that happening now.

I'm glad to see this though. I have been working on a file editor for minecraft[2] that might eventually work for keeping copies of docker logs, editing code or some such. Advanced VIM functions are not on my docket however. Baby steps.

Maybe more modders will move to mineTest if Microsoft/Mojang continues to sidestep the Minecraft modding community.

[1] http://www.minecraftforum.net/forums/mapping-and-modding/min...

[2] http://www.minecraftforum.net/forums/mapping-and-modding/min...


Microsoft seems to be taking it far more seriously with the release of the Minecraft modding tools for Visual Studio[1].

[1]: https://visualstudiogallery.msdn.microsoft.com/043ab247-8771...


I had not seen this. It's not Microsoft throwing developers on maintaining Forge though or some official API, just a few templates. Seems to me more like a push to promote VS than Minecraft modding. Maybe a sign of good things to come.


Minetest is very... opinionated... when it comes to modding. Gluing a Java webserver to it as I've done with Minecraft wouldn't be possible, as far as I can tell.


I haven't done any Minetest modding, but I'm sure a pretty large part of that is due to the lack of a JVM. Forge can easily enough unpack the jar for clean enough source to plug into. C++ requires the Minetest devs themselves to guess what modders want to do and build Lua entrypoints. With the new Windows 10/Pocket edition of Minecraft being C++ as well, they'd have to do the same thing I would think.


Sorry, I should have been clearer. When I looked I couldn't work out how to build my own Lua "entrypoints" - mainly because I don't know Lua.


Docker 2.0 will fix all this. Oh wait you were talking about minecraft


Couldn't agree more about how difficult it is to mod the game... but 1.9 definitely is not out yet.

Update changelog: http://mcupdate.tumblr.com/


Sorry, got mixed up with 1.8.8


>One dude is maintaining Forge/MinecraftCodersPack/Fernflower, which powers pretty much every mod

Forge is maintained by cpw and Lex, as well as a large community of modders. MCP is a completely different project and is still headed by Searge and ProfMobius (now with Mojang), among others. And I'm not sure what Fernflower has to do with anything.

>Ad-infested forums and adfly links are the preferred way of distributing mods

Partially true. Many have moved to Curse or CurseForge (which isn't any better).

>The last moddable client version is 1.8.0, 1.9 is out.

1.9 is not out, and work cannot even begin on enabling 1.9 mods until MCP is released. They'd be working with obfuscated code otherwise.

>Getting a mod started is really difficult, and it's not clear what should/shouldn't be in source control.

Having just recently gone through this, I wouldn't say it's that bad. It will generate a .gitignore file for you, and set up workspaces for both IDEA and Eclipse. Other IDEs may be more difficult to setup.


> And I'm not sure what Fernflower has to do with anything.

> ...

> 1.9 is not out, and work cannot even begin on enabling 1.9 mods until MCP is released. They'd be working with obfuscated code otherwise.

That's where Fernflower comes in; it deobfuscates the minecraft class files for forge and the modders. If the compiled minecraft jar were to "move enough bytecode" to Java 9 (that's a very inaccurate way to put it, but just for the sake of argument), and Fernflower were to be abandoned before then, it would be extremely difficult for forge and MCP to be updated, let alone all the mods themselves.


I disagree with it being difficult to get a mod started, you simply download the mdk (like a mod template) and follow the instructions on the readme. I'm not sure, but they might even have a git ignore in the mdk these days.

Edit: In addition, LexManos is no longer the sole contributor, cpw has returned, and MCP has always been a separate project which has managed to keep a core team.

About 1.9, because the minecraft code is obfuscated and very complex, updating forge to new minecraft versions takes a long time for MCP to release mappings, then forge to port etc, so I'm really not surprised that updating takes a while.

Most mods these days are distributed through curse forge, which although has adverts, is reputable and curse pays per download. The minecraft forums are as buggy and crap laden as always unfortunately.


Ah I didn't realise cpw had come back. That's good news.

By MDK do you mean Forge? MDK doesn't seem to be used except in one forum thread.


The mdk (renamed from src zip, because it no longer contained the forge source) is a zip containing a template mod, gradle buildscript, and instructions on setting up your ide, you c an download it here: http://files.minecraftforge.net/


Thanks for this, I might take a look on the weekend.


Strange, why isn't there a homebrew/bower/npm/whatever package manager for minecraft?

~ modcraft install <package> # installs <package> to your minecraft server

~ modcraft create <some_new_package_you_wanna_make> # creates a new package with your .gitignore already setup so you can make your own mod

etc. etc.

Years ago when I played minecraft I remember someone was hired specifically to make Minecraft have an API to make modding easier. What happened to that?


There are several modpack launchers available now (Tekkit, FTB, ATLauncher, etc...), but mod authors get butthurt when you don't visit their ad infested download links and there is infighting between the different groups.

Minecraft's mod scene is a mess. Whatever Mojang's efforts were to make the game mod friendly have never seen the light of day. It's really sad because mod authors have done some really amazing stuff with the engine, but because every update breaks everything its too hard to keep most of the running for more than a version or two.


What's really hurt the mod scene is fragmentation - search for Minecraft Mods on Google and the unofficial-official Curse forums will probably come up but there's also many other sites that re-host (with more ads).

I've heard anecdotal reports of malware being spread through these unofficial mirrors too.

Can you imagine if there had been mods.minecraft.com from the start with some kind of central organisation?


I actually tried doing something like this maybe a year back, but it got out of my scale in terms of complexity vs the amount of time I was willing to put into it. Having to manage jar and asset patches, replacements, additions, deletions (as well as the same things for the items within each jar, for example), as well as having to handle config files and other random messes that mods created, without any sort of breakage was quite difficult, especially considering how incorrect installation order of mods would often cause conflicts (meaning that even if modloader and forge, for example, worked alone and forge could be installed before modloader, installing modloader first might break forge). Making this work without an accidentally Turing complete build system is very difficult. Maybe a standard MC build system and API would help clean this all up to the point where Mojang could create a working system to handle all of this properly while interfacing with the launcher's profile system.


Omg, the mod forums are so terrible. I forbid my kid from downloading any but even I can't distinguish the ads from the download link.


Please don't forbid them completely. If they're still really into Minecraft it's worth looking into a few of the more popular mods. (Depending on age, there's some really good mechanics/electronics mods).

http://www.learntomod.com/ looks like a good idea but I'm put off by the subscription model.


Depends on what you want to do, but writing a server side plugin will usually be easier than the mod route. I believe this is what the author of this hack did.


The Minecraft modding community is (and has always been) so ludicrously toxic it's amazing the whole mess hasn't collapsed already.


Not to mention open-source is kind of an alien concept to most of the community. People are really anal about usage rights. At least with texture packs it got to the point where they had to start forcing everyone to choose a license. I think there were even "unions" that popped up to help prevent people from being ripped off.


Forgive me for nitpicking, but your second to last point is incorrect.

Mojang/MS are working on version 1.9 but the latest version released (by default) to clients is 1.8.8, the rest are snapshots of 1.9 (IE not official version releases.. which means in turn modding tools and server frameworks will not upgrade until the full release of 1.9)


Yep, you're correct.


Well Microsoft owns Minecraft. So I imagine modding will get more official support in a year. Probably a nicer API too.


Mojang have been promising this for years, nothing has ever happened and I doubt any modding api they release will have the flexibility to edit the base game that MinecraftForge has.


About this time last year I was working on an animal mod. The tools and documentation were pretty abysmal. Doing anything interesting required a lot of messing around. I'm not doing any more modding of MineCraft until official work is done on an API.


The author got around it by using a completely alternate, but client compatible, Minecraft server: https://github.com/cuberite/cuberite



And here I was honestly expecting to read a bug report of data loss due to a Creeper attack.


Each container should have a cake inside. That should solve the problem.


Oh yes! It was so funny to read that one! :D We should start listing hilarious bug reports, I sure we're going to get quite a bunch.


"My web server died when I ran into the wall"

"Not enough bricks to establish connection to db container"

"Firewall daemon in container shuts off at night then comes back on automatically at day"

...yea


Related, there's a Twitter account that posts weird excerpts from changelogs and patch notes, mostly from games: https://twitter.com/thestrangelog

  "Reduced maximum amount of feathers you can get from hitting dead birds with rocks"
  "Fixed a bug where robots would spawn underneath the piano."
  "Rodent men have no skin"


Thanks!


This is the future of computing, and I mean that without any irony whatsoever. Simulating physical spaces as a metaphor for complex systems is incredibly powerful. I expect to see much more of this in the coming decade, especially once VR starts hitting its stride.


I doubt it. I only want to see relevant information on my UI. How is a 3D spatial representation relevant to the daily tasks of a sysadmin? The relationship between these two information spaces seems tenuous to me.


It's about mapping inputs into a mental picture of what reality is. I am quite good at looking at various diagnostics and reporting available to me and figuring out what is going on. I can look at my New Relic server graphs over time, ps, df, du, free, and others to arrive at a conclusion for what is happening. Someone untrained would not come to the same conclusion as me.

Now, if my network were a castle and bad packets or DDoS attacks looked like Catapults and flaming arrows. It would be very obvious to someone viewing that scene that we are at war and possibly losing. If my walls were huge and the arrows few you would not worry. If my walls were low and small and the arrows many you would realize we are losing. This is an image that can be looked at and understood almost universally, without the need for years of training on what the debug logs in a firewall look like.


I disagree. It may start to make some sense if we get full VR/AR, but right now, with limited screen-space of 2D monitors, using such a system is much more complex and time-consuming than doing things directly.

That said, I'm considering installing it just to have an excuse for playing Minecraft at work.


Oh wow. I can imagine a virtual world that is a physical datacenter but you can see all your servers on racks as if they were real servers, add in appliances and other things. Not sure how practical it would be, but sounds pretty fun. Own your entire virtual datacenter.

So each server on the rack would be linked to a virtual server on a provider, maybe if you use S3 be able to visualize all your storage as if it was a physical storage cluster in your own datacenter. Be pretty awesome, but not sure if it'd be more of a novelty.


I've seen a mod for controlling J2EE appservers from inside MC. I think it would be fun to start with, but lose its appeal after a while.

Most 2D interfaces are fairly poor. A 3D one would be just as bad.


If I was microsoft, I would overhaul minecraft mods and make it possible to write them in c# (maybe with a bridge or something). Get kids into your stack and fix an existing pain point.



Were I Microsoft, I'd immediately containerize a Minecraft server.


It has been done multiple times, by several people. Just run a search on GitHub :)

Usually you would install java, download the latest server jar and just start it. I was working on a set of scripts to launch multiple containers on the same host and keep track of the ports exposed, but I've only spent a couple of hours on it and jumped to something else https://github.com/pjperez/Multicraft

I've also added a poor man's queue system using Azure Storage :)

Forgive my poor coding; I'm not a developer and only do these things as a hobby.


Were I Microsoft, I wouldn't know how to find my back side.


I started writing a "bridge" inspired by a lost project that allowed writing mods in C#.

Pull requests welcome, but I'm unlikely to go back to it any time soon.

https://github.com/voltagex/minecraft-rebridge



With enough games and enough time we could have a real interesting set of game-based tooling :)


Or a really great way to learn someone's distributed architecture. How fun would it be to explore around in 3D and seeing the data flow in various ways.


This was pretty cool. I think folks really need to watch the demo in the closing video when it gets published. I think the most catchy sentence in the demo was “you can finally show your kids what is this containers thing you are working on”. :)


Can you implement fallover on failure by hooking up the torch on one block to the switch on another using redstone?


Mind = blown. Why not visualize code like this? Walking around in your API, watching the flow of data... :)


Or manage processes? http://psdoom.sourceforge.net/


I'm not sure if this is the video i'm trying to recall, but.. https://www.youtube.com/watch?v=B824CmVbhJ8


I hope this one works better than kitematic! I'm really excited by the implications of docker, but the practicality of using it on windows has proved to be troublesome.

It is very difficult to get docker containers running locally (at least using the gui tools)

I know that MS believes in it wholesale so am really looking forward to the day when the tools catch up to their promises.

So far I've been bashing my head against the wall whenever I've gotten past "tutorial phase 1"

Getting a webhost, database, memcached, rabbitmq, load balancer etc... All talking to each other on a local 'dev' system... theoretically a perfect mirror of the thing that will be the super scalable production system.

Difficult.

I'm undoubtedly doing stuff wrong, but if there are any docker wizards out there, please point me to your blogs! I'm dying to finally wrap my head around the promises of scalable containerization.

EDIT: I just watched their youtube video. This interface is honestly amazing. To be able to arrange virtual machines in 3d space. What a phenomenal tool. This will really help me learn how to use docker effectively.


Kubernetes. Specifically, running kubelet locally is a great way to bring up a "pod" of just the containers you want, configured the way you want. It's actually pretty conveniant, and as dev I have started preferring it as a way of quickly bringing up new things to test on my dev machine. And Kubernetes was designed to scale...you should be able to take your local config file and make it part of the broader client/server based Kubernetes setup...and it will bring your containers up across a cluster of servers.


Thanks for the lead! I'll look this up today.


> It is very difficult to get docker containers running locally.

Don't try to wade upstream, docker is a Solaris/Linux technology. Just go with the flow. Soon enough, we'll have C#/.NET running on Linux in containers with the CoreCLR project.

And also, SSH works!


I've actually had "small projects" running .net in docker locally.

Compiles and runs fine, kick off the kestrel web server and you're great.

That is however, specifically, the boiler plate stuff. As soon as I started trying to build a multi project solution with various nuget dependencies, things started to fall apart at compile time.

What was interesting to me was the fact that it was nuget transfers that started timing out and failing in the docker build. I can't actually explain what was happening ... and as a weekend d project it was just non critical to make it work in docker. (As opposed to just make it work "full stop".)

When I have more time and confidence, as well as after the tools have matured a little more, I'm definitely going to take another pass at it.


This will hopefully inspire others to see "boring" applications in a new way. I've always wanted a double-entry bookkeeping system inside of a game engine.

Internet, please make it happen.


Dude, if you really wanna see containers use Sysdig: https://sysdig.com/wp-content/uploads/2015/07/screen-dynamic...


I'm going to go out on a limb here and guess that that this fills a slightly different need than Sysdig. Sysdig is amazing though.


Conceptually, this is way ahead of its time.


ahead? This 3d representation of computer operations has been a staple of “hacker” movie art direction since the 80's. Tron, WarGames, Jurassic Park.


But this actually works.


People have implemented real time process visualisation in SecondLife.Plus tons of other things like that years ago. Doing it in MC is possible, but clunky.


can you use some sort of redstone contraption to interact with the containers?


Maybe that would be a good way to do scripting within the game... :)


Imagine a skyscraper, each floor is a forest of docker cubes. Now imagine a massive Redstone engine managing them, not unlike one of the Minecraft GPUs.


Seem like there's great potential here as an educational tool to learn how these abstract systems interact. Great stuff.


Does this remind anyone else of a very rudimentary looking Gibson (from Hackers)? Only 20 years in the making...


Looks comical at first, but this type of thing can have great benefits for people who are not hardcore techies. Things can be done with a physical metaphor in everyday language. Shut down this server, make a copy, and so forth.


Now to make a minecraft server to manage my other minecraft docker servers...


You can run docker inside a docker inside a docker, so you can now run docker minecraft inside a docker minecraft that manages other dockers and docker minecrafts?


and then add BungeeCord or something in front of them so that you can enter those servers inside Minecraft by physically entering portals within the container 'buildings'


And then you can create new docker containers running minecraft servers...



>r = os.execute("goproxy exec?cmd=docker+stop+" .. containerID)

Please no.


What's another way to do it? This is a hack after all, but I'm sure they'll accept pull requests.


Of course! We're really not working full time on this, had to make it work. I agree that one is horrible!!!


The REST purist in me would advise against GET requests for executing actions. Not sure how I'd design the actionable namespace though; not a lot of experience there I'm afraid. But perhaps a POST of "cmd=stop" to "hxxp://$host:$port/docker/container/$containerId".


This maybe a really good training tool for docker containers.


I was about to migrate a side project using docker containers to AWS Lambda just for fun... Now I guess I'll stick with docker a few more months... =)


This is actually "Skeuomorphism level 2". Super great.


man this is so good .... in the future we will have kids playing/working for free (just joking)


This is neat on so many levels.


awesome!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: