• 1 Post
  • 206 Comments
Joined 1 year ago
cake
Cake day: June 13th, 2023

help-circle


  • I struggled with this for a long time, and then I just decided to use synology photos.

    It has albums, tagging, geolocation, sharing. It has phone picture backup, it is inherently a backup as it’s on my NAS and I back that data up again.

    I want to keep the thing that I really care about the most friction free and also not too dependent on myself so that I can still experiment.

    I didn’t try PiGallery2 though, maybe I will have a look!




  • sudneo@lemmy.worldtoSelfhosted@lemmy.worldDocker or podman?
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 months ago

    I really thought swarm was dead :)

    To be honest, some kubernetes distributions make the cluster operations minimal (I use k0s managed via ansible)!

    Either way, the moment you go from N containers on one box to N containers on M boxes you need to start considering how to handle stateful applications, load balancing, etc. And that in general requires knowledge on a domain which is different from having simply applications wrapped in containers locally.


  • Yeah ultimately every container has it’s own veth interface, so you can do shaping using tc on those.

    Edit: I had a look at docker-tc. It does what you want, BUT. Unless your use case is complex, I would really think twice about running a tool written in bash which has access to the docker socket (I.e. trivial node escape) and runs with NET_ADMIN capability.

    That’s a lot of power to do something you can also do with a few lines of code executed after you start the container. Again, provided that your use case is not complex.


  • Cgroups have the ability to limit TCP and total network bandwidth. I don’t know from the top of my mind whether this can be configured at runtime (I.e. via docker run), but you can specifcy at runtime the cgroup parent to use. This means you can pre-create the cgroup, set the limits and start the container with that parent cgroup.

    You can also run some hook script after launch that adds the PID to a cgroup every time the container is launched, or possibly use tc.

    I am not aware of the ability to only limit uplink bandwidth, but I have not researched this.




  • sudneo@lemmy.worldtoSelfhosted@lemmy.worldDocker or podman?
    link
    fedilink
    English
    arrow-up
    6
    ·
    4 months ago

    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.



  • sudneo@lemmy.worldtoSelfhosted@lemmy.worldDocker or podman?
    link
    fedilink
    English
    arrow-up
    23
    arrow-down
    6
    ·
    4 months ago

    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.



  • In fact I don’t personally agree with doing it here, but I mean, there is no other way to do age verification. There are technically ways that can make sure the only data reaching the end customer (the porn site) is a boolean (minor or not), and the identity verification is generally done by another entity, but ultimately yes I agree, I wouldn’t do it either and I personally think it’s not worth in this case at all (I think proper sex education in school is probably what I would invest on).

    There is also another thing to consider though, which is that porn is different from -say- a gambling site (where you have to make identity verification) mostly due to religious/moral stigma on sex. This makes me a little bit conflicted because I would like a society in which sex is freed from stigma and shame, and where “associate yourself with a porn site” is not as bad as it is now. Definitely the age verification is not the way to pursue this objective, but overall this makes me ask questions like "why would I have not a problem doing the same for a gambling site but I would for porn? Does it align with my values or is it coming from cultural pressure I disagree with?





  • If there is already another reverse proxy, doing this IMHO is worse than just running a container and adding one more rule in the proxy (if needed, with traefik it’s not for example). I also build all my servers with IaC and a repeatable setup, so installing stuff manually breaks the model (I want to be able to migrate server with minimal manual action, as I had to do it already twice…).

    The job is simple either way, I would say it mostly depends on which ecosystem someone is buying into and what secondary requirements one has.


  • I would consider the lack of a shell a benefit in this scenario. You really don’t want the extra attack surface and tooling.

    Considering you also manage the host, if you want to see what’s going on inside the container (which for such a simple image can be done once while building it the first time more likely), you can use unshare to spawn a bash process in the container namespaces (e.g., unshare -m -p […] -t PID bash, or something like this - I am going by memory).