26
submitted 6 days ago by wolf@lemmy.zip to c/linux@lemmy.ml

Hello, fellow Linux users!

My question is in the titel: What is a good approach to deploy docker images on a Raspberry Pi and run them?

To give you more context: The Raspberry Pi runs already an Apache server for letsencrypt and as a reverse proxy, and my home grown server should be deployed in a docker image.

To my understanding, one way to achieve this would be to push all sources over to the Raspberry Pi, build the docker image on the Raspberry Pi, give the docker image a 'latest' tag and use Systemd with Docker or Podman to execute the image.

My questions:

  • Has anyone here had a similar problem but used a different approach to achieve this?
  • Has anyone here automated this whole pipeline that in a perfect world, I just push updated sources to the Raspberry Pi, the new docker image gets build and Docker/Podman automatically pick up the new image?
  • I would also be happy to be pointed at any available resources (websites/books) which explain how to do this.

At the moment I am using Raspbian 12 with a Raspberry Pi Zero 2 W and the whole setup works with home grown servers which are simply deployed as binaries and executed via systemd. My Docker knowledge is mostly from a developer perspective, so I know nearly nothing about deploying Docker on a production machine. (Which means, if there is a super obvious way to do this I might not even be aware this way exists.)

you are viewing a single comment's thread
view the rest of the comments
[-] just_another_person@lemmy.world 1 points 6 days ago

You just...build it.

If you're looking for a way to run it like a system service, you could make a systemd unit I suppose, but it's little effort to make a compose config, or a quadlet if you're running podman.

[-] wolf@lemmy.zip 1 points 6 days ago

AFAIK Podman only supports quadlets from version 4.4 and later, I am on version 4.3... so, technically you are right and it would work (for me end of the year or next year, when Raspbian gets an update to Trixie), I am mostly interested how people achieved this and automated this and if there are different/better approaches than the ones outlined by me above.

[-] just_another_person@lemmy.world 2 points 6 days ago

Compose is stateful, so if you start a container and demonize it, it will start it again on restart of the machine until you stop it (by default), so that's one way. If you want to hook into systems, you can go that route, but it's not going to net you much just trusting one mechanism over another.

this post was submitted on 17 May 2025
26 points (100.0% liked)

Linux

54324 readers
352 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS