How to develop penpot with podman (penpotman)

Current status (updated – not part of original post)

:white_check_mark: Penpotman (Ubuntu 20.04, OpenSUSE Tumbleweed)
:white_check_mark: Penpotman (Windows 10) explored by @candidexmedia (18. July, 2023)
:x: Penpotman (Mac 12.6, x86)


Hi, I want to develop some penpod feature locally and ideally (on success) create a PR later on. My plan was to use podman instead of docker.

Following this instructions worked more or less flawlessly. I got the webinterface running locally, and i was able to login with the user I created via the script.

Being optimistic I’m am able to start developing I followed this guide.
I copied the manage.sh to my own manage-podman.sh swapped all

  • docker with podman
  • docker compose with podman-compose
  • removed all :z because Mac has an issue with SELinux
  • set higher ulimits

But run now in an issue during spinning up of the front-end

[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies
warning " > react-virtualized@9.22.3" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning " > react-virtualized@9.22.3" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
error An unexpected error occurred: "EMFILE: too many open files, copyfile '/home/penpot/.cache/yarn/v6/npm-color-convert-2.0.1-72d3a68d598c9bdb3af2ad1e84f21d896abd4de3-integrity/node_modules/color-convert/conversions.js' -> '/home/penpot/penpot/frontend/node_modules/ansi-styles/node_modules/color-convert/conversions.js'".
info If you think this is a bug, please open a bug report with the information provided in "/home/penpot/penpot/frontend/yarn-error.log".

Anyone having experience with setting up penpot with podman (or how i call it: penpotman) for development? It feels like 95% done, but missing one or two magic adjustments.

4 Likes

Prefect timing! I was - and still am - also planning to deploy penpot with podman with an eye towards minor dev work. Very eager to hear from the devs on this.

1 Like

Deploying penpot on podman and running penpot devenv in podman is not the same thing. Development environment requires more tricky hacks and workarounds. The regular deploy should work without problems I guess but I’m not personally using podman.

So is seems this is only a Mac/Potman issue. I installed podman and podman-compose on a Ubuntu 20.04 machine and the only thing I did was to copy the manage.sh to my own manage-podman.sh swapped all

  • docker compose with podman-compose
  • docker␣ with podman␣

So really cool to see this working, but it would be even nicer to get it to work on my Mac x86 machine.
Probably this is more a Podman issue than Penpot, but maybe someone here has an idea or got it working

Current status
:white_check_mark: Penpotman (Ubuntu 20.04)
:x: Penpotman (Mac 12.6, x86)

1 Like

What a random encounter!
:wave:

1 Like

(Also related to the topic: As far as I know, there can’t be a native podman implementation for OSX, since you’d always need a Linux kernel running in the background. Since I don’t have a Mac myself to try, I can’t give you any more advice right now. But I guess you fixed it at some point in the past 3 months already :slight_smile: )

Nice to meet you here @elektrowolle.

Unfortunately I didn’t have time to investigate further with Mac development via podman. Also because I guess setting up a linux machine in my network is ok for that kind of development.

Thank you for sharing this!

I confirm that Penpot on Podman (Penpotman) works on Windows 10.

Here are the instructions:

Tools needed:

Steps

  1. Download Podman Desktop exe.

  2. Download podman from podman (there should be a prompt in Podman → see screenshot below):

  3. Run pip3 install podman-compose from the command prompt.

  4. Create a folder on your PC for Penpot.

  5. Launch the command prompt from the file explorer by typing cmd in the address bar.

  6. In the command prompt, type the following to clone the repo to your PC:
    git clone https://github.com/penpot/penpot.git

  7. Run podman-compose on the Penpot docker file. Go into the ~/penpot/docker/images directory, and run podman-compose.

    cd penpot/docker/images
    podman-compose -p penpot -f docker-compose.yaml up -d

  8. Go to http://localhost:9001 to create an account and access Penpot.

  9. To re-access your Penpot site after you’ve restarted your computer: go to “Containers”, select your image, and hit the play icon “Start Compose” and return to your localhost site

To update

See my next comment

Creating shortcuts

Create a new shortcut with the followingtarget:

C:\Windows\System32\cmd.exe /k podman-compose -p penpot -f docker-compose.yaml up -d & explorer "http://localhost:9001"

Optional: change the icon to penpot’s ico
Open the properties for the shortcut, and change “Shortcut” > “Start in” field to the location of your images folder:

Optional: change the icon to penpot’s

1 Like

Can you PLEASE POST your code for " my own manage-podman.sh".

I am on ubuntu 22. Can anyone PLEASE post step by step install instructions. Telling me to look at this link then this other older link and replacing this with that is not helping LOL. I have done all these things and I’m getting no where. Also…what is …https://github.com/ThirteenTwoConsulting/PenpotPodman/tree/main.....what is this? I’ve downloaded it and ran the .run.sh…nothing but errors.

I’ve spent hours…and now I’m about to give up and try the regular docker install listed on the the main site. If that fails…back to Figma.

This is basically a summary from previous answers, plus a small addition based on how I ran things. It’s not necessarily complete for a “production ready” system :wink:
Disclaimer: I’m not using Ubuntu but Fedora, so i can’t go into detail on how to install podman/podman-compose/git there.

  1. Ensure git, podman and podman-compose are installed. (e.g. in Fedora dnf install git podman podman-compose)
  2. In a terminal, run git clone https://github.com/penpot/penpot.git.It will create a penpot directory where you currently are :wink:
  3. change into the images directory: cd penpot/docker/images
  4. Run podman-compose: podman-compose -p penpot -f docker-compose.yaml up -d. It will download a bunch of images. It might be required to select the repository where to download from, depending on your podman setup. You probably have to choose the docker hub for all of them when prompted.
  5. Create an account via CLI (makes it easier, as chances are you won’t get an email out from your local system and for me for whatever reason creating the profile via browser didn’t work):
    podman exec -ti penpot_penpot-backend_1 python3 ./manage.py create-profile. Follow the prompts.
  6. Open browser, go to http://localhost:9001.
  7. Login. Voila.

:slight_smile:

1 Like

This did help…thank you…now I have this error message

$ podman-compose -p penpot -f docker-compose.yaml up -d
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 3.4.4
** excluding:  set()
['podman', 'ps', '--filter', 'label=io.podman.compose.project=penpot', '-a', '--format', '{{ index .Labels "io.podman.compose.config-hash"}}']
WARN[0000] Error validating CNI config file /home/unclefonso/.config/cni/net.d/penpot.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
['podman', 'network', 'exists', 'penpot_penpot']
WARN[0000] Error validating CNI config file /home/unclefonso/.config/cni/net.d/penpot.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
podman run --name=penpot_penpot-exporter_1 -d --label io.podman.compose.config-hash=87c50c428bb9ce353f1b26ad58e829ec3317dc50d90cb734d8cdab1b621e0010 --label io.podman.compose.project=penpot --label io.podman.compose.version=1.0.6 --label PODMAN_SYSTEMD_UNIT=podman-compose@penpot.service --label com.docker.compose.project=penpot --label com.docker.compose.project.working_dir=/home/unclefonso/myapps/penpot/docker/images --label com.docker.compose.project.config_files=docker-compose.yaml --label com.docker.compose.container-number=1 --label com.docker.compose.service=penpot-exporter -e PENPOT_PUBLIC_URI=http://penpot-frontend -e PENPOT_REDIS_URI=redis://penpot-redis/0 --net penpot_penpot --network-alias penpot-exporter --restart always penpotapp/exporter:latest
WARN[0000] Error validating CNI config file /home/unclefonso/.config/cni/net.d/penpot.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
Error: short-name "penpotapp/exporter:latest" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf"
exit code: 125
podman start penpot_penpot-exporter_1
WARN[0000] Error validating CNI config file /home/unclefonso/.config/cni/net.d/penpot.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
Error: no container with name or ID "penpot_penpot-exporter_1" found: no such container
exit code: 125
podman volume inspect penpot_penpot_postgres_v15 || podman volume create penpot_penpot_postgres_v15
['podman', 'volume', 'inspect', 'penpot_penpot_postgres_v15']


Anyone have an idea how to get past this block?

Does anyone know how to get past this error?

$ podman-compose -p penpot -f docker-compose.yaml up -d
podman-compose version: 1.0.6
[‘podman’, ‘–version’, ‘’]
using podman version: 3.4.4
** excluding: set()
[‘podman’, ‘ps’, ‘–filter’, ‘label=io.podman.compose.project=penpot’, ‘-a’, ‘–format’, ‘{{ index .Labels “io.podman.compose.config-hash”}}’]
WARN[0000] Error validating CNI config file /home/unclefonso/.config/cni/net.d/penpot.conflist: [plugin bridge does not support config version “1.0.0” plugin portmap does not support config version “1.0.0” plugin firewall does not support config version “1.0.0” plugin tuning does not support config version “1.0.0”]
[‘podman’, ‘network’, ‘exists’, ‘penpot_penpot’]
WARN[0000] Error validating CNI config file /home/unclefonso/.config/cni/net.d/penpot.conflist: [plugin bridge does not support config version “1.0.0” plugin portmap does not support config version “1.0.0” plugin firewall does not support config version “1.0.0” plugin tuning does not support config version “1.0.0”]
podman run --name=penpot_penpot-exporter_1 -d --label io.podman.compose.config-hash=87c50c428bb9ce353f1b26ad58e829ec3317dc50d90cb734d8cdab1b621e0010 --label io.podman.compose.project=penpot --label io.podman.compose.version=1.0.6 --label PODMAN_SYSTEMD_UNIT=podman-compose@penpot.service --label com.docker.compose.project=penpot --label com.docker.compose.project.working_dir=/home/unclefonso/myapps/penpot/docker/images --label com.docker.compose.project.config_files=docker-compose.yaml --label com.docker.compose.container-number=1 --label com.docker.compose.service=penpot-exporter -e PENPOT_PUBLIC_URI=http://penpot-frontend -e PENPOT_REDIS_URI=redis://penpot-redis/0 --net penpot_penpot --network-alias penpot-exporter --restart always penpotapp/exporter:latest
WARN[0000] Error validating CNI config file /home/unclefonso/.config/cni/net.d/penpot.conflist: [plugin bridge does not support config version “1.0.0” plugin portmap does not support config version “1.0.0” plugin firewall does not support config version “1.0.0” plugin tuning does not support config version “1.0.0”]
Error: short-name “penpotapp/exporter:latest” did not resolve to an alias and no unqualified-search registries are defined in “/etc/containers/registries.conf”
exit code: 125
podman start penpot_penpot-exporter_1
WARN[0000] Error validating CNI config file /home/unclefonso/.config/cni/net.d/penpot.conflist: [plugin bridge does not support config version “1.0.0” plugin portmap does not support config version “1.0.0” plugin firewall does not support config version “1.0.0” plugin tuning does not support config version “1.0.0”]
Error: no container with name or ID “penpot_penpot-exporter_1” found: no such container
exit code: 125
podman volume inspect penpot_penpot_postgres_v15 || podman volume create penpot_penpot_postgres_v15
[‘podman’, ‘volume’, ‘inspect’, ‘penpot_penpot_postgres_v15’]

Looks like it’s time to go back to Docker. I’m getting no help on podman. So unfortunate. This question is coming up empty on Stack overflow as well…sigh.

Hey @unclefons0!

I was able to run Penpot on my Podman 4.7.1 on Arch. I’m using podman-compose as well. I was looking at the logs you posted, and although I didn’t have those, it gives me some ideas that I had in the past.

For

Error: short-name "penpotapp/exporter:latest" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf"

Podman in certain distros does not come with the registries pre-defined, so you need to add them.
in /etc/container/registries.conf add the following line

unqualified-search-registries = ["docker.io"]

Now, for the warning

WARN[0000] Error validating CNI config file /home/unclefonso/.config/cni/net.d/penpot.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 

This is probably related with how your distro distribute Podman. I’d advise some time reading the official docs here: Setup CNI Networking

Does anyone know how to upgrade to the latest Penpot version with Podman?

Edit: Figured it out! Essentially, replace any docker-compose commands with podman-compose.

To update

Go to your ~/penpot/docker/images folder and launch the command line.

podman-compose -f docker-compose.yaml pull

To restart with the update

Stop penpot:

podman-compose -p penpot -f docker-compose.yaml down

Start penpot:

podman-compose -p penpot -f docker-compose.yaml up -d

Cleanup
Make sure to prune your volumes and images in Podman Desktop afterwards:

Inside docker-compose.yaml

add docker.io/ in front of image name in image variable.

Example:

image: “postgres:15”
image: “docker.io/postgres:15

This helped me to run Penpot locally.

Hi Great going,
Im using MX Linux. Can someone create a easier latest Guide to locally install PenPot with Podman?

Thanks

Related discussions: