I’m working on a project that requires containers.
I would use Docker but I couldn’t get rootless Docker to work as their docs describe within Replit and found no other posts about it. If anyone has tips on that, let me know!
In either case, I know Podman is popular because of its rootless capabilities. Has anyone gotten Podman to run successfully on Replit? Because I’m having issues.
There are a few other posts about Podman, but no one ever says whether or not they got Podman to work:
- Allow docker in Repls and Deployments - #7 by dragonhunter1
- Docker daemon not running - #2 by dragonhunter1
- Docker in replit - #9 by iceylogo
cc @dragonhunter1 because it sounds like you might have had success with this in the past?
I’m able to install pkgs.podman
via Nix, but starting the actual daemon isn’t working for me:
> podman ps
WARN[0000] "/" is not a shared mount, this could cause issues or missing mounts with rootless containers
cannot clone: Operation not permitted
Error: cannot re-exec process
I tried out a few things from the NixOS docs on Podman to no avail. Most docs talk about setting up Podman with systemd
, but we don’t have that in the Replit OS.
Here the relevant portions of my Nix config:
{ pkgs }:
{
deps = [
# pkgs.docker
pkgs.podman
pkgs.podman-compose
];
# Result is the same with or without this, even if spelt 'virtualization'
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
};
}
The virtualisation
property might only be a NixOS thing, but Podman won’t start with or without it.