• 0 Posts
  • 36 Comments
Joined 3 years ago
cake
Cake day: June 18th, 2023

help-circle






  • Depends on what you’d want. A dockerfile defines how the image is built. If you want to mimic this then you need scripts.

    But I think you could benefit from learning how docker works from the ground up if you want to recreate docker inages in lxc.

    Better use is a dedicated docker host (a vm) and run your non-docker on lxc. Treat lxc as a minimal vm for one ( or a few) services/apps per lxcontainer


  • That depend on how much work you have to do to keep it working.

    Let’s take a fairly common webserver like Caddy. Now you can install this through docker, or natively on linux.

    If the app only exists as docker image then it cones down to your ability or recreating what the dockerfile does to get it installed on your lxc container.

    Fun fact: early editions of docker used lxc for its containers.




  • There are big differences between these two technologies. LXC is closer to a virtual machine than a docker setup. You could mimic most of a dockerfile if you wanted, but it’s not a replacement.

    Most of us will use a mix og docker-hosts(vm’s running docker) and lxc. Reasons for this is that some stuff is easier to maintain in docker as it’s the preferred release channel.

    You can also move vm’s to other datacenter hosts if needed - and with shared storage this is quick and mean no downtime. Lxc are stuck on the host.










  • I like caddy for flexibility and ease with handle_parh. I believe there was some example on the tailscale website for a tcp caddy proxy.

    Some sites cant be rewritten and have to be served on their expected path. Like some http file will refer to a css or something with absolute path.

    Also you can get chatgpt or similar help you and ask it to explain whats being done and why. Just be stern and let it know what you’re using for software + versions. They know a lot of old shit too these LLMs