this post was submitted on 06 Nov 2026
464 points (97.2% liked)

Technology

89562 readers
2456 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] fonix232@fedia.io 34 points 2 days ago (3 children)

Why would you even have an SSH server running in a Docker container (unless the purpose of the container is being a jumpbox or similar)?

I can't emphasise it enough how much more secure you get when you use rootless, read-only containers that are limited to truly just the software you want to run and its dependencies.

Alpine is great for dev containers, but the final container should be:

  • immutable on the app layer (any executable path needs to be read only)
  • have only the absolutely necessary GNU tooling, service management, etc. included (for most software you don't even need these tools, and why would you give an attacker who gain access to your container, an easy way to e.g. scan your network?)
  • only the data mounted, rw only if absolutely necessary (e.g. if you host a Jellyfin server, just an example, you should have the mounted media be RO, and only the config and caches be writable, mounted noexec of course)
[–] dan@upvote.au 6 points 2 days ago* (last edited 2 days ago) (1 children)

Not just rootless and read-only, but distroless/chiseled too. There's no reason to have unneeded parts of an OS in your Docker containers. It should just be one app along with any libraries it needs (or just statically compile the app)

[–] IronKrill@lemmy.ca 8 points 2 days ago (1 children)

While I have not done it, I could see it being appealing as it's quicker than SSHing into the parent box first for a commonly used tool. I had a direct SSH into a systemd container for a while before deciding the extra config wasn't worth it.

[–] nautevenkidding@feddit.org 3 points 2 days ago

Could that not be configured with a proxyjump through the host machine still, if one needed to have this?

[–] MonkderVierte@lemmy.zip 1 points 2 days ago* (last edited 2 days ago) (1 children)

unless the purpose of the container is being a jumpbox or similar

What's wrong with a rootless jumpbox?

[–] fonix232@fedia.io 3 points 2 days ago

Nothing, my point was that SSH in a container is unnecessary unless it's for the specific purpose of the container.