DEV Community

Timur Gabaidulin
Timur Gabaidulin

Posted on

Dockyard vs. Lazydocker: Yes, Dockyard is Faster. No, You Won't Notice. Yes, I'm Posting About It Anyway.

I was perfectly happy using Lazy Docker. It's a great tool. Does everything I need. But one day, hopped up on copious amounts of caffeine, I thought... "You know what this perfectly functional tool needs? An alternative written in Rust."

No one asked for this. There was no practical reason. I did it anyway, just because.

So I present to you: Dockyard

The Problem That Didn't Exist

You know what's wrong with Lazy Docker? Nothing, really. But hear me out:

  • It's written in Go (ewww, garbage collector go brrrr)
  • It takes a whole 247 milliseconds to start up
  • It uses up to 41 MB of memory
  • The binary is 13 MB (do you know how many floppy disks that is?!)

Friends, I cannot emphasize this enough... those are rookie numbers.

Enter Dockyard: The Hero No One Asked For

After 3 weeks of fighting the borrow checker, I emerged victorious with Dockyard - a Docker container manager that does roughly 80% of what Lazy Docker does, but in Rust.

Here are the benchmarks that will make you question your entire technology stack:

Startup Time: The Race You Didn't Know You Were Running

| Tool        | Cold Start | Warm Start | Time Saved* |
|-------------|------------|------------|-------------|
| Lazy Docker | 247ms      | 89ms       | 0ms         |
| Dockyard    | 31ms       | 12ms       | ALL OF IT   |
Enter fullscreen mode Exit fullscreen mode
  • Time saved is measured in "ability to feel superior"

That's right. While Lazy Docker is still putting on its shoes, Dockyard has already listed your containers, judged your image naming conventions, and started a blog about it.

So what is the real world impact? Over the course of a year, assuming you open your Docker manager 10 times per day (you don't), you'll save approximately 43.3 seconds. That's almost enough time to read this sentence!

Memory Usage: Because Chrome Doesn't Need All Of It

| Tool        | Peak Memory | Avg Memory | Your Judgment |
|-------------|-------------|------------|---------------|
| Lazy Docker | 41.2 MB     | 38.7 MB    | "Acceptable"  |
| Dockyard    | 8.3 MB      | 6.1 MB     | "I MUST TELL EVERYONE" |
Enter fullscreen mode Exit fullscreen mode

Dockyard uses 82% less memory than Lazy Docker.

Is this meaningful? Absolutely not.

Your Electron based Slack instance uses more memory than both tools combined just to render a single emoji.

But will I bring it up anyway? You bet your cargo build --release I will.

Binary Size: The Metric That Matters When Nothing Else Does

Lazy Docker:  13 MB
Dockyard:     2.7 MB (stripped)
Enter fullscreen mode Exit fullscreen mode

"But wait," I hear you saying, "my computer has 1TB of storage. Why does this matter?"

IT MATTERS BECAUSE I SPENT THREE DAYS OPTIMIZING IT.

That 10.3 MB difference is enough space to store approximately 10.3 million copies of this sentence explaining why it matters. (It doesn't.)

Time to First "It Compiles!"

  • Lazy Docker: 2 minutes (Go is easy mode)
  • Dockyard: 3 weeks (the borrow checker has trust issues)

Lines of Code Spent Fighting Lifetime Annotations

  • Lazy Docker: 0 (cowards)
  • Dockyard: 847 (badges of honor)

Ability to Mention You Use Rust

  • Lazy Docker: 0/10 (can't even bring it up casually)
  • Dockyard: 10/10 (I've already told you 4 times in this article)

Making Objectively Bad Time Investment Decisions

  • Lazy Docker: Sensible people use this
  • Dockyard: I spent 3 weeks on this instead of touching grass

Features You Didn't Ask For

Zero-cost abstractions* * Emotional cost not included

Memory safety without garbage collection (Lazy Docker's GC pauses were causing TENS of nanoseconds of latency)

Thread safety (Even though it's single-threaded, but it could be thread-safe)

Fearless concurrency (Currently not concurrent, but fearlessly so)

Features Lazy Docker Has That Dockyard Doesn't (YET)

  • Metrics graphs (planned)
  • Debugging tools (lol why would you need those?)
  • Users besides me (working on it)

But here's the thing: Dockyard is B L A Z I N G L Y F A S T ⚡🦀⚡

Installation

# Lazy Docker (for normies)
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash

# Dockyard (for the enlightened)
git clone https://github.com/905timur/dockyard.git
cd dockyard
cargo build --release
# Wait 8 minutes while LLVM optimizes your life choices
# Copy binary to somewhere
# Configure PATH
# Realize you forgot to strip the binary
# strip ./target/release/dockyard
# Done! Only 47 more steps!
Enter fullscreen mode Exit fullscreen mode

Real Talk: Why I Actually Did This

Okay, jokes aside for exactly one paragraph:

Honestly? I have no good excuse. I actually wrote a container management TUI in Python for personal use and as soon as I tried it on my tiny, resource-constrained VPS, I was like..."I'll just learn Rust instead" and spiraled into full-blown obsession. I learned a ton though:

  • tokio and async Rust (still don't fully understand it)
  • The bollard crate for Docker APIs (pretty great actually)
  • TUI programming with ratatui (delightfully painful)
  • That the Docker API has SEVENTEEN different types of timestamps
  • That I have an unhealthy relationship with optimization

Building Dockyard was genuinely fun, and while Lazy Docker is objectively better for actual use, sometimes you just need to commit to a bit. Plus, shaving milliseconds off startup time gave me a dopamine hit I haven't felt since I discovered coffee.

Conclusion

Is Dockyard better than Lazy Docker?

No.

Is it faster?

Technically yes, by milliseconds you'll never notice.

Should you use it?

Only if you have an appreciation for hand-crafted, boutique grade Rust written software.

Did I waste 3 weeks of my life on this?

Unquestionably yes.

Would I do it again?

Ask me after therapy.

Am I okay?

Define "okay."

Top comments (0)