chiisana ,
@chiisana@lemmy.chiisana.net avatar

If docker works for you, then don’t change what’s not broken. If there are things you don’t like about docker (root access etc for example) then venture out and try others. At the end of the day, they’re just tools to get to the more interesting stuff — actually running applications and playing with them.

fmstrat ,

Just pointing out your response may be dated. Docker can run rootless: https://docs.docker.com/engine/security/rootless/

chiisana ,
@chiisana@lemmy.chiisana.net avatar

Cool. Thanks! One less reason for me to even consider Porman on the radar. Personally, I really don’t care for the tool itself, and am way more interested in the apps that I can run and play with :)

fmstrat ,

Agreed. Honesly I use docker like snap these days. Need a specific version of node?

alias node="docker run --rm -ti -v '${PWD}:${PWD}' -w '${PWD}' node:16-alpine"

alias npm="docker run --rm -ti -v '${PWD}:${PWD}' -w '${PWD}' node:16-alpine npm"

Pretty much every CLI tool that isn't super basic to install I do this with.

dandroid ,

Wow, that's really clever. And dead simple at the same time.

fmstrat ,

Yea, I contribute to a bunch of own source projects, so it makes it easy to jump around without conflicts. Also great for random stuff like youtube-dl, or esphome, etc, that you use once in a while. Just slap the aliases in my bashrc.

sudneo ,

I would say Docker. There is no substantial benefit in running podman, while docker is a widely adopted tool (which means more tooling in the ecosystem, easier to find answers to questions etc.). The difference is not huge tbh, and some time ago the biggest advantage for podman was being able to run rootless, while docker was stuck with a root daemon. This is not the case anymore (docker can run rootless), so I would say unless you have some specific argument to use podman, stick with docker.

atzanteol ,

Whichever one you want.

Ledivin ,

If you don't have strong opinions one way or the other, then docker is the easy answer. Way, way more widespread, which generally tends to mean better docs, more guides and examples, more tooling and open-source support...

kevincox ,
@kevincox@lemmy.ml avatar

I would say podman by default. It has a better security architecture as it can run rootless.

However there are small differences from Docker so you may need use Docker if you are trying to run third-party services that rely on these differences.

sudneo ,

Docker can run rootless too, see https://docs.docker.com/engine/security/rootless/

ramble81 ,

Piggybacking on this… what’s the quickest way to deploy a docker container in Kubernetes short of having to hand create the deployment yaml? Or is that it, having to create one from scratch.

sudneo ,

You have a bunch of options:

kubectl run $NAME --image=$IMAGE

this just creates a pod running the specific image. If you kill the pod, or it terminates, it won't be run again.
In general though, you probably want to do some customization before running (maybe you need volumes, secrets, env, ports, labels, securityContext, etc.) and for that you can simply let kubectl generate the boilerplate YAML and then simply make some edit:

kubectl run $NAME --image=$IMAGE --dry-run=client -o yaml > mypod.yaml
# edit mypod.yaml
kubectl create -f mypod.yaml

You can do the same with a deployment or statefulset:

kubectl create deployment $NAME -n $NAMESPACE [...] --dry-run=client -o yaml > deployment.yaml

In case you don't need anything fancy, the kubectl create subcommand allows you to create simple workload, so probably that's the answer to your question.

ramble81 ,

You rock! Yeah I just wanted to run the image first before building out the whole framework around it. This is what I was looking for.

Static_Rocket , (edited )
@Static_Rocket@lemmy.world avatar

It depends on what you want. Do you want containers that don't blow away your firewall? Podman is nice, but docker can be configured a little to avoid this. Want things that autostart and don't have issues with entry points that attempt to play with permissions/users? Docker or podman as root is necessary. Want reasonable compose support? Podman now needs a daemon/socket. Want to make build containers and not deal with permission/user remapping at all? Podman is really nice.

Do not attempt to use podman-compose. That app is dead.

Unfortunately if you want to make tools that will be used by other people then you must add docker support. It just owns too much of the market.

poVoq ,
@poVoq@slrpnk.net avatar

Podman is significantly better if you want to leverage the Systemd integration it has out of the box.

But if you just want to run existing docker-compose scripts then Docker is easier.

BentiGorlich ,
@BentiGorlich@gehirneimer.de avatar

Honestly I use docker because by now I know docker and basically everything has support for it...

lemmyvore ,

If you're just starting out and have never used containers before start with regular (rootful) docker. It's a much simpler mechanism to understand for a beginner and has more widespread support and documentation.

Once you understand containers and have used them for a few months you can start going down the rabbit hole, there's no shortage of technologies to explore.

Or, if you're only interested in self-hosting as a hobby and docker does what you need, you can also stop there. Not everybody needs a deep dive into technology.

matcha_addict ,

I learned podman as a beginner. This isn't to say that what you're saying is wrong. It was much more difficult doing so. I am only commenting to say that its possible but needs patience.

WeLoveCastingSpellz ,

I like podman more because people told me it was better and it just worked for me :P

Molecular0079 ,

I use podman with the podman-docker compatibility layer and native docker-compose. Podman + podman-docker is a drop-in replacement for actual docker. You can run all the regular docker commands and it will work. If you run it as rootful, it behaves in exactly the same way. Docker-compose will work right on top of it.

I prefer this over native Docker because I get the best of both worlds. All the tutorials and guides for Docker work just fine, but at the same time I can explore Podman's rootless containers. Plus I enjoy it's integration with Cockpit.

titey ,
@titey@jlai.lu avatar

Podman. This is the way.

rentar42 ,

I personally prefer podman, due to its rootless mode being "more default" than in docker (rootless docker works, but it's basically an afterthought).

That being said: there's just so many tutorials, tools and other resources that assume docker by default that starting with docker is definitely the less cumbersome approach. It's not that podman is signficantly harder or has many big differences, but all the tutorials are basically written with docker as the first target in mind.

In my homelab the progression was docker -> rootless docker -> podman and the last step isn't fully done yet, so I'm currently running a mix of rootless docker and podman.

PoliticallyIncorrect , (edited )
@PoliticallyIncorrect@lemmy.world avatar

I use Docker and it works for what I use it so I have no need to change it, maybe if in the future I have the need to use podman I would consider to change. But right now I'm not interested.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • selfhosted@lemmy.world
  • test
  • worldmews
  • mews
  • All magazines